/);
__PACKAGE__->sql_maker_class('DBIx::Class::SQLAHacks');
-
# Each of these methods need _determine_driver called before itself
# in order to function reliably. This is a purely DRY optimization
my @rdbms_specific_methods = qw/
#limited has_many
( $attrs->{rows} && keys %{$attrs->{collapse}} )
||
- # limited prefetch with RNO subqueries
+ # limited prefetch with RNO subqueries (otherwise a risk of column name clashes)
(
$attrs->{rows}
&&
@{$attrs->{_prefetch_select}}
)
||
- # grouped prefetch
+ # grouped prefetch (to satisfy group_by == select)
( $attrs->{group_by}
&&
@{$attrs->{group_by}}
}
elsif (
+ # the RNO limit dialect mangles the SQL such that the join gets lost
+ # wrap a subquery here
($attrs->{rows} || $attrs->{offset})
&&
$sql_maker->limit_dialect eq 'RowNumberOver'
&&
scalar $self->_parse_order_by ($attrs->{order_by})
) {
- # the RNO limit dialect above mangles the SQL such that the join gets lost
- # wrap a subquery here
push @limit, delete @{$attrs}{qw/rows offset/};