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';
}
;
],
},
- GenericSubQ => {
+ GenericSubquery => {
limit => [
'(
SELECT me.id, owner__id, owner__name, bar, baz
'+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
});
#
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 (
) 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"
}