From: Matt S Trout Date: Sun, 6 May 2012 23:59:42 +0000 (+0000) Subject: FirstSkip works X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bc4005e6cb20c078763b55b1ed5e80e67bf35c1b;p=dbsrgits%2FDBIx-Class-Historic.git FirstSkip works --- diff --git a/t/sqlmaker/limit_dialects/skip_first.t b/t/sqlmaker/limit_dialects/skip_first.t index ba2d8cf..8325cc3 100644 --- a/t/sqlmaker/limit_dialects/skip_first.t +++ b/t/sqlmaker/limit_dialects/skip_first.t @@ -14,7 +14,12 @@ my ($LIMIT, $OFFSET) = ( my $schema = DBICTest->init_schema; -$schema->storage->_sql_maker->limit_dialect ('SkipFirst'); +$schema->storage->_sql_maker->renderer_class( + Moo::Role->create_class_with_roles(qw( + Data::Query::Renderer::SQL::Naive + Data::Query::Renderer::SQL::Slice::SkipFirst + )) +); my $rs_selectas_col = $schema->resultset ('BooksInLibrary')->search ({}, { '+select' => ['owner.name'], @@ -132,9 +137,9 @@ is_same_sql_bind( '( SELECT SKIP ? FIRST ? [me].[id], [me].[owner] FROM [books] [me] - WHERE ( ( (EXISTS ( + WHERE ( ( EXISTS ( SELECT SKIP ? FIRST ? [owner].[id] FROM [owners] [owner] WHERE ( [books].[owner] = [owner].[id] ) - )) AND [source] = ? ) ) + ) AND [source] = ? ) ) )', [ [ $OFFSET => 2 ], #outer