# make up an order if none exists
my $requested_order = (delete $rs_attrs->{order_by}) || $self->_rno_default_order;
+
+ # the order binds (if any) will need to go at the end of the entire inner select
+ local $self->{order_bind};
my $rno_ord = $self->_order_by ($requested_order);
+ push @{$self->{select_bind}}, @{$self->{order_bind}};
# this is the order supplement magic
my $mid_sel = $sq_attrs->{selection_outer};
);
my ($sql, @bind) = @${$owners->page(3)->as_query};
+ # not testing the SQL as it is quite different between top/rno
is_same_bind (
\@bind,
[
- ($dialect eq 'Top' ? [ { dbic_colname => 'test' } => 'xxx' ] : ()), # the extra re-order bind
- [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'me.name' }
- => 'somebogusstring' ],
[ { dbic_colname => 'test' }
=> 'xxx' ],
- ($dialect ne 'Top' ? ( [ $OFFSET => 7 ], [ $TOTAL => 9 ] ) : ()), # parameterised RNO
+ [ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'me.name' }
+ => 'somebogusstring' ],
+
+ ($dialect eq 'Top'
+ ? [ { dbic_colname => 'test' } => 'xxx' ] # the extra re-order bind
+ : ([ $OFFSET => 7 ], [ $TOTAL => 9 ]) # parameterised RNO
+ ),
+
[ { sqlt_datatype => 'varchar', sqlt_size => 100, dbic_colname => 'me.name' }
=> 'somebogusstring' ],
[ { dbic_colname => 'test' }
);
($sql, @bind) = @${$books->page(3)->as_query};
+ # not testing the SQL as it is quite different between top/rno
is_same_bind (
\@bind,
[