From: Peter Rabbitson Date: Tue, 4 May 2010 08:13:47 +0000 (+0000) Subject: _select_args processing no longer necessary X-Git-Tag: v0.08122~34^2~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e4dd2413cf6add731083c60f493cc7374b3fcf8;hp=a0da03096cd65314cb337d6f4254cd1a0ce4ed7b;p=dbsrgits%2FDBIx-Class.git _select_args processing no longer necessary --- diff --git a/lib/DBIx/Class/SQLAHacks/Oracle.pm b/lib/DBIx/Class/SQLAHacks/Oracle.pm index 5caf0a2..0ca54b6 100644 --- a/lib/DBIx/Class/SQLAHacks/Oracle.pm +++ b/lib/DBIx/Class/SQLAHacks/Oracle.pm @@ -25,29 +25,27 @@ sub new { } sub select { - my ($self, $table, $fields, $where, $order, @rest) = @_; + my ($self, $table, $fields, $where, $rs_attrs, @rest) = @_; - $self->{_db_specific_attrs} = pop @rest; - - my ($sql, @bind) = $self->SUPER::select($table, $fields, $where, $order, @rest); + my ($sql, @bind) = $self->SUPER::select($table, $fields, $where, $rs_attrs, @rest); push @bind, @{$self->{_oracle_connect_by_binds}}; return wantarray ? ($sql, @bind) : $sql; } sub _emulate_limit { - my ( $self, $syntax, $sql, $order, $rows, $offset ) = @_; + my ( $self, $syntax, $sql, $rs_attrs, $rows, $offset ) = @_; - my ($cb_sql, @cb_bind) = $self->_connect_by(); + my ($cb_sql, @cb_bind) = $self->_connect_by($rs_attrs); $sql .= $cb_sql; $self->{_oracle_connect_by_binds} = \@cb_bind; - return $self->SUPER::_emulate_limit($syntax, $sql, $order, $rows, $offset); + return $self->SUPER::_emulate_limit($syntax, $sql, $rs_attrs, $rows, $offset); } sub _connect_by { - my ($self) = @_; - my $attrs = $self->{_db_specific_attrs}; + my ($self, $attrs) = @_; + my $sql = ''; my @bind; diff --git a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm index e6bf5ae..5f54bd6 100644 --- a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm +++ b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm @@ -417,24 +417,6 @@ sub with_deferred_fk_checks { after => sub { $txn_scope_guard->commit }); } -sub _select_args { - my ($self, $ident, $select, $where, $attrs) = @_; - - my $connect_by_args = {}; - if ( $attrs->{connect_by} || $attrs->{start_with} || $attrs->{order_siblings_by} || $attrs->{nocycle} ) { - $connect_by_args = { - connect_by => $attrs->{connect_by}, - nocycle => $attrs->{nocycle}, - start_with => $attrs->{start_with}, - order_siblings_by => $attrs->{order_siblings_by}, - } - } - - my @rv = $self->next::method($ident, $select, $where, $attrs); - - return (@rv, $connect_by_args); -} - =head1 ATTRIBUTES Following additional attributes can be used in resultsets.