X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsqlmaker%2Flimit_dialects%2Frno.t;h=347cf90d4cc33b74c47cd4201c4acf11bd32add8;hb=fcb7fcbb6bde5f9a211c62011b3110f07828caec;hp=04fb045eaddc8563c8b4ad4554f928bbaeb7fdf0;hpb=ee53ca0f8e39882bc30fee5cb6db9e0318d09d59;p=dbsrgits%2FDBIx-Class.git diff --git a/t/sqlmaker/limit_dialects/rno.t b/t/sqlmaker/limit_dialects/rno.t index 04fb045..347cf90 100644 --- a/t/sqlmaker/limit_dialects/rno.t +++ b/t/sqlmaker/limit_dialects/rno.t @@ -5,6 +5,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 $schema = DBICTest->init_schema; @@ -34,10 +40,13 @@ is_same_sql_bind( WHERE ( source = ? ) ) me ) me - WHERE rno__row__index BETWEEN 1 AND 1 + WHERE rno__row__index >= ? AND rno__row__index <= ? )', - [ [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'source' } - => 'Library' ] ], + [ + [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'source' } => 'Library' ], + [ $OFFSET => 1 ], + [ $TOTAL => 1 ], + ], ); $schema->storage->_sql_maker->quote_char ([qw/ [ ] /]); @@ -67,10 +76,13 @@ is_same_sql_bind( WHERE ( [source] = ? ) ) [me] ) [me] - WHERE [rno__row__index] BETWEEN 1 AND 1 + WHERE [rno__row__index] >= ? AND [rno__row__index] <= ? )', - [ [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'source' } - => 'Library' ] ], + [ + [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'source' } => 'Library' ], + [ $OFFSET => 1 ], + [ $TOTAL => 1 ], + ], ); {