Commit | Line | Data |
f66596f9 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use DBIx::Class::Storage::DBI; |
6 | |
7 | plan tests => 1; |
8 | |
9 | my $sa = new DBIC::SQL::Abstract; |
10 | |
11 | $sa->limit_dialect('RowNum'); |
12 | |
13 | is($sa->select('rubbish', |
eac29141 |
14 | [ 'foo.id', 'bar.id', \'TO_CHAR(foo.womble, "blah")' ], |
f66596f9 |
15 | undef, undef, 1, 3), |
16 | 'SELECT * FROM |
17 | ( |
18 | SELECT A.*, ROWNUM r FROM |
19 | ( |
eac29141 |
20 | SELECT foo.id AS col1, bar.id AS col2, TO_CHAR(foo.womble, "blah") AS col3 FROM rubbish |
f66596f9 |
21 | ) A |
22 | WHERE ROWNUM < 5 |
23 | ) B |
24 | WHERE r >= 4 |
25 | ', 'Munged stuff to make Oracle not explode'); |