# 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 {
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,
);
# CONNECT BY
# parentid = prior persionid
-=head2 nocycle
+=head2 connect_by_nocycle
=over 4
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
# 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' } },