From: Robert Bohne Date: Fri, 14 May 2010 21:35:33 +0000 (+0000) Subject: Rename option nocycle to connect_by_nocycle X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ef5db92857777285b47ccebdcddca4a6ce9f6916;p=dbsrgits%2FDBIx-Class-Historic.git Rename option nocycle to connect_by_nocycle --- diff --git a/lib/DBIx/Class/SQLAHacks/Oracle.pm b/lib/DBIx/Class/SQLAHacks/Oracle.pm index b0c08bb..a73137a 100644 --- a/lib/DBIx/Class/SQLAHacks/Oracle.pm +++ b/lib/DBIx/Class/SQLAHacks/Oracle.pm @@ -11,7 +11,6 @@ use Carp::Clan qw/^DBIx::Class|^SQL::Abstract/; # TODO: # - Review by experienced DBIC/SQL:A developers :-) # - Problem with count and connect_by look the TODO in t/73oracle.t -# - Rename option nocycle to connect_by_nocycle # sub new { @@ -59,7 +58,7 @@ sub _connect_by { if ( my $connect_by = $attrs->{'connect_by'} ) { my ($connect_by_sql, @connect_by_sql_bind) = $self->_recurse_where( $attrs->{'connect_by'} ); $sql .= sprintf(" %s %s", - ( $attrs->{'nocycle'} ) ? $self->_sqlcase('connect by nocycle') + ( $attrs->{'connect_by_nocycle'} ) ? $self->_sqlcase('connect by nocycle') : $self->_sqlcase('connect by'), $connect_by_sql, ); diff --git a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm index 5f54bd6..9ab80bf 100644 --- a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm +++ b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm @@ -442,7 +442,7 @@ and child rows of the hierarchy. # CONNECT BY # parentid = prior persionid -=head2 nocycle +=head2 connect_by_nocycle =over 4 @@ -453,7 +453,7 @@ and child rows of the hierarchy. If you want to use NOCYCLE set to 1. connect_by => { parentid => 'prior personid' }, - nocycle => 1 + connect_by_nocycle => 1 # adds a connect by statement to the query: # SELECT diff --git a/t/73oracle.t b/t/73oracle.t index 5dcd567..ee5c97b 100644 --- a/t/73oracle.t +++ b/t/73oracle.t @@ -641,7 +641,7 @@ if ( $schema->storage->isa('DBIx::Class::Storage::DBI::Oracle::Generic') ) { # select the whole cycle tree with nocylce { my $rs = $schema->resultset('Artist')->search({}, { - nocycle => 1, + connect_by_nocycle => 1, start_with => { name => 'cycle-root' }, '+select' => [ \ 'CONNECT_BY_ISCYCLE' ], connect_by => { parentid => { -prior => \ 'artistid' } },