[Bast-commits] r9299 - in
DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class:
SQLAHacks Storage/DBI/Oracle
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue May 4 08:13:47 GMT 2010
Author: ribasushi
Date: 2010-05-04 09:13:47 +0100 (Tue, 04 May 2010)
New Revision: 9299
Modified:
DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class/SQLAHacks/Oracle.pm
DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
Log:
_select_args processing no longer necessary
Modified: DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class/SQLAHacks/Oracle.pm
===================================================================
--- DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class/SQLAHacks/Oracle.pm 2010-05-04 08:12:30 UTC (rev 9298)
+++ DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class/SQLAHacks/Oracle.pm 2010-05-04 08:13:47 UTC (rev 9299)
@@ -25,29 +25,27 @@
}
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;
Modified: DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
===================================================================
--- DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm 2010-05-04 08:12:30 UTC (rev 9298)
+++ DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm 2010-05-04 08:13:47 UTC (rev 9299)
@@ -417,24 +417,6 @@
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.
More information about the Bast-commits
mailing list