8 use DBIC::SqlMakerTest;
10 my $s = DBICTest->init_schema (no_deploy => 1, );
11 $s->storage->sql_maker->limit_dialect ('RowNum');
13 my $rs = $s->resultset ('CD');
16 $rs->search ({}, { rows => 1, offset => 3,columns => [
18 { 'bar.id' => 'bar.id' },
19 { bleh => \ 'TO_CHAR (foo.womble, "blah")' },
21 '(SELECT id, bar__id, bleh
23 SELECT id, bar__id, bleh, ROWNUM rownum__index
25 SELECT foo.id AS id, bar.id AS bar__id, TO_CHAR(foo.womble, "blah") AS bleh
29 WHERE rownum__index BETWEEN 4 AND 4
32 'Rownum subsel aliasing works correctly'
36 $rs->search ({}, { rows => 1, offset => 3,columns => [
38 { 'ends_with_me.id' => 'ends_with_me.id' },
40 '(SELECT id, ends_with_me__id
42 SELECT id, ends_with_me__id, ROWNUM rownum__index
44 SELECT foo.id AS id, ends_with_me.id AS ends_with_me__id
48 WHERE rownum__index BETWEEN 4 AND 4
51 'Rownum subsel aliasing works correctly'