=> [qw/cdid title foo bar/],
{
- '+select' => [ 'genreid', $multicol_rs->as_query ],
- '+as' => [qw/genreid name rank/],
+ '+select' => \'unaliased randomness',
} => 'SELECT
me.cdid,
me.title,
DISTINCT(foo, bar),
- me.genreid,
- (SELECT me.name, me.rank FROM artist me WHERE ( artistid 1 ))
+ unaliased randomness
FROM cd me'
- => [qw/cdid title foo bar genreid name rank/],
-
+ => [qw/cdid title foo bar/],
{
- '+select' => { count => 'me.cdid', -as => 'cnt' }, # lack of 'as' infers from '-as'
- '+columns' => { len => { length => 'me.title' } },
+ '+select' => [ 'genreid', $multicol_rs->as_query ],
+ '+as' => [qw/genreid name rank/],
} => 'SELECT
me.cdid,
me.title,
- LENGTH( me.title ),
- COUNT( me.cdid ) AS cnt,
DISTINCT(foo, bar),
me.genreid,
- (SELECT me.name, me.rank FROM artist me WHERE ( artistid 1 ))
+ (SELECT me.name, me.rank FROM artist me WHERE ( artistid 1 )),
+ unaliased randomness
FROM cd me'
- => [qw/cdid title len cnt foo bar genreid name rank/],
+ => [qw/cdid title foo bar genreid name rank/],
{
- '+select' => \'unaliased randomness',
+ '+select' => { count => 'me.cdid', -as => 'cnt' }, # lack of 'as' infers from '-as'
+ '+columns' => { len => { length => 'me.title' } },
} => 'SELECT
me.cdid,
me.title,
FROM cd me'
=> [qw/cdid title len cnt foo bar genreid name rank/],
+
);
my $rs = $schema->resultset('CD');
is_deeply(
$rs->_resolved_attrs->{as},
$as,
- 'Correct dbic-side aliasing',
+ "Correct dbic-side aliasing for test $testno",
);
$testno++;