X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsqlmaker%2Flimit_dialects%2Frownum.t;h=841f883397184aefebf11c9bead5f8d0e8f0a4a0;hb=fcb7fcbb6bde5f9a211c62011b3110f07828caec;hp=2fa12ca58b9951f91caa8ee0798bd8d87ca24fbe;hpb=ee53ca0f8e39882bc30fee5cb6db9e0318d09d59;p=dbsrgits%2FDBIx-Class.git diff --git a/t/sqlmaker/limit_dialects/rownum.t b/t/sqlmaker/limit_dialects/rownum.t index 2fa12ca..841f883 100644 --- a/t/sqlmaker/limit_dialects/rownum.t +++ b/t/sqlmaker/limit_dialects/rownum.t @@ -6,6 +6,12 @@ use Test::More; use lib qw(t/lib); use DBICTest; use DBIC::SqlMakerTest; +use DBIx::Class::SQLMaker::LimitDialects; + +my ($TOTAL, $OFFSET) = ( + DBIx::Class::SQLMaker::LimitDialects->__total_bindtype, + DBIx::Class::SQLMaker::LimitDialects->__offset_bindtype, +); my $s = DBICTest->init_schema (no_deploy => 1, ); $s->storage->sql_maker->limit_dialect ('RowNum'); @@ -26,11 +32,14 @@ is_same_sql_bind ( SELECT foo.id AS id, bar.id AS bar__id, TO_CHAR(foo.womble, "blah") AS bleh FROM cd me ) me - WHERE ROWNUM <= 4 + WHERE ROWNUM <= ? ) me - WHERE rownum__index >= 4 + WHERE rownum__index >= ? )', - [], + [ + [ $TOTAL => 4 ], + [ $OFFSET => 4 ], + ], 'Rownum subsel aliasing works correctly' ); @@ -46,11 +55,14 @@ is_same_sql_bind ( SELECT foo.id AS id, ends_with_me.id AS ends_with_me__id FROM cd me ) me - WHERE ROWNUM <= 5 + WHERE ROWNUM <= ? ) me - WHERE rownum__index >= 4 + WHERE rownum__index >= ? )', - [], + [ + [ $TOTAL => 5 ], + [ $OFFSET => 4 ], + ], 'Rownum subsel aliasing works correctly' );