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', | |
14 | [ 'foo.id', 'bar.id' ], | |
15 | undef, undef, 1, 3), | |
16 | 'SELECT * FROM | |
17 | ( | |
18 | SELECT A.*, ROWNUM r FROM | |
19 | ( | |
20 | SELECT foo.id AS col1, bar.id AS col2 FROM rubbish | |
21 | ) A | |
22 | WHERE ROWNUM < 5 | |
23 | ) B | |
24 | WHERE r >= 4 | |
25 | ', 'Munged stuff to make Oracle not explode'); |