From: Dagfinn Ilmari Mannsåker Date: Sat, 23 Mar 2013 10:02:50 +0000 (+0000) Subject: Change GenericSubQ to GenercSubquery, since that's what DQ calls it X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=40941e1e00eab9c42c709a8776a7fd9b3239c02d;p=dbsrgits%2FDBIx-Class-Historic.git Change GenericSubQ to GenercSubquery, since that's what DQ calls it --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 69d41b7..a47e595 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -954,12 +954,12 @@ sub sql_maker { carp ( "Your storage class ($s_class) does not set sql_limit_dialect and you " . 'have not supplied an explicit limit_dialect in your connection_info. ' - . 'DBIC will attempt to use the GenericSubQ dialect, which works on most ' + . 'DBIC will attempt to use the GenericSubquery dialect, which works on most ' . 'databases but can be (and often is) painfully slow. ' . "Please file an RT ticket against '$s_class' ." ); - 'GenericSubQ'; + 'GenericSubquery'; } ; diff --git a/t/sqlmaker/limit_dialects/torture.t b/t/sqlmaker/limit_dialects/torture.t index 100e8a1..1e352a4 100644 --- a/t/sqlmaker/limit_dialects/torture.t +++ b/t/sqlmaker/limit_dialects/torture.t @@ -691,7 +691,7 @@ my $tests = { ], }, - GenericSubQ => { + GenericSubquery => { limit => [ '( SELECT me.id, owner__id, owner__name, bar, baz @@ -791,7 +791,7 @@ my $r = eval { '+columns' => { bar => \['? * ?', [ $attr => 11 ], [ $attr => 12 ]], baz => \[ '?', [ $attr => 13 ]] }, group_by => \[ 'avg(me.id / ?)', [ $attr => 21 ] ], having => \[ '?', [ $attr => 31 ] ], - ($limtype =~ /GenericSubQ/ ? ( order_by => 'me.id' ) : () ), # needs a simple-column stable order to be happy + ($limtype =~ /GenericSubquery/ ? ( order_by => 'me.id' ) : () ), # needs a simple-column stable order to be happy }); # @@ -836,7 +836,7 @@ my $r = eval { offset => 1, columns => 'name', # only the owner name, still prefetch all the books prefetch => 'books', - ($limtype =~ /GenericSubQ/ ? ( order_by => 'me.id' ) : () ), # needs a simple-column stable order to be happy + ($limtype =~ /GenericSubquery/ ? ( order_by => 'me.id' ) : () ), # needs a simple-column stable order to be happy }); is_same_sql_bind ( @@ -846,7 +846,7 @@ my $r = eval { ) if $tests->{$limtype}{limit_offset_prefetch}; # we can actually run the query - if ($limtype eq $native_limit_dialect or $limtype eq 'GenericSubQ') { + if ($limtype eq $native_limit_dialect or $limtype eq 'GenericSubquery') { lives_ok { is ($pref_rs->all, 1, 'Expected count of objects on limtied prefetch') } "Complex limited prefetch works with supported limit $limtype" }