START WITH
name = ?
CONNECT BY
- parentid = prior artistid
+ parentid = PRIOR( artistid )
ORDER SIBLINGS BY
name DESC
my $rs = $schema->resultset('Artist')->search({ parentid => undef },
{
'start_with' => { 'name' => 'greatgrandchild' },
- 'connect_by' => { '-prior' => [ \'parentid', \'artistid' ] } ,
+ 'connect_by' => { 'artistid' => { '-prior' => \'parentid' } },
});
=pod
SELECT
START WITH
name = ?
CONNECT BY
- prior parentid = artistid
+ artistid = PRIOR( parentid )
Parameters: 'greatgrandchild'
=cut
my $rs = $schema->resultset('Artist')->search({},
{
'start_with' => { 'name' => 'greatgrandchild' },
- 'connect_by' => { '-prior' => [ \'parentid', \'artistid' ] },
+ 'connect_by' => { artistid => { '-prior' => \'parentid' } },
'order_by' => 'name ASC',
});
my $ok = 1;
START WITH
name = ?
CONNECT BY
- prior parentid = artistid
+ artistid = PRIOR( parentid )
ORDER BY
name ASC
my $rs = $schema->resultset('Artist')->search({},
{
'start_with' => { 'name' => 'greatgrandchild' },
- 'connect_by' => { '-prior' => [ \'parentid', \'artistid' ] },
+ 'connect_by' => { 'artistid' => { '-prior' => \'parentid' } },
'order_by' => 'name ASC',
'rows' => 2,
'page' => 1,
START WITH
name = ?
CONNECT BY
- prior parentid = artistid
+ artistid = PRIOR( parentid )
Parameters: 'greatgrandchild'
=cut