);
};
-has limit_requires_order_by_stability_check
- => (is => 'rw', default => sub { 0 });
-
-has limit_enforces_order_by_stability
- => (is => 'rw', default => sub { 0 });
-
# for when I need a normalized l/r pair
sub _quote_chars {
map
my %final_attrs = (%{$rs_attrs||{}}, limit => $limit, offset => $offset);
- if ($offset and $self->limit_requires_order_by_stability_check) {
+ my %slice_stability = $self->renderer->slice_stability;
+
+ my $stability = $slice_stability{$offset ? 'offset' : 'limit'};
+
+ if ($stability) {
my $source = $rs_attrs->{_rsroot_rsrc};
unless (
$final_attrs{order_is_stable}
@final_attrs{qw(from order_by where)}
)
) {
- if ($self->limit_enforces_order_by_stability) {
+ if ($stability eq 'requires') {
if ($self->converter->_order_by_to_dq($final_attrs{order_by})) {
$self->throw_exception(
'Current limit/offset implementation requires a stable order for offset'
# based on toplimit.t
delete $schema->storage->_sql_maker->{_cached_syntax};
$schema->storage->_sql_maker->limit_dialect('FetchFirst');
-$schema->storage->_sql_maker->limit_requires_order_by_stability_check(1);
-$schema->storage->_sql_maker->limit_enforces_order_by_stability(1);
my $books_45_and_owners = $schema->resultset ('BooksInLibrary')->search ({}, {
prefetch => 'owner', rows => 2, offset => 3,
$schema->storage->_sql_maker->limit_dialect('RowNum');
-$schema->storage->_sql_maker->limit_requires_order_by_stability_check(1);
-
my $rs = $schema->resultset ('CD')->search({ id => 1 });
my $where_bind = [ { dbic_colname => 'id' }, 1 ];
# We could test all of this via $sq->$op directly,
# but some conditions need a $rsrc
$schema->storage->_sql_maker->limit_dialect('Top');
-$schema->storage->_sql_maker->limit_requires_order_by_stability_check(1);
-$schema->storage->_sql_maker->limit_enforces_order_by_stability(1);
my $books_45_and_owners = $schema->resultset ('BooksInLibrary')->search ({}, {
prefetch => 'owner', rows => 2, offset => 3,