}
catch {
if ($opts{$opts_name}{required}) {
- BAIL_OUT "on_connect_call option '$opts_name' is not functional: $_";
+ die "on_connect_call option '$opts_name' is not functional: $_";
}
else {
skip
my $test_type = "Dialect:$dialect Quoted:$quoted";
# basic limit support
- TODO: {
+ {
my $art_rs = $schema->resultset ('Artist');
$art_rs->delete;
$art_rs->create({ name => 'Artist ' . $_ }) for (1..6);
);
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' }
is ($owners->page(1)->count, 3, "$test_type: has-many prefetch returns correct count");
is ($owners->page(3)->count, 2, "$test_type: has-many prefetch returns correct count");
- TODO: {
+ {
local $TODO = "Top-limit does not work when your limit ends up past the resultset"
if $dialect eq 'Top';
is ($owners->page(3)->all, 2, "$test_type: has_many prefetch returns correct number of rows");
);
($sql, @bind) = @${$books->page(3)->as_query};
+ # not testing the SQL as it is quite different between top/rno
is_same_bind (
\@bind,
[
is ($books->page(1)->count, 2, "$test_type: Prefetched grouped search returns correct count");
is ($books->page(2)->count, 1, "$test_type: Prefetched grouped search returns correct count");
- TODO: {
+ {
local $TODO = "Top-limit does not work when your limit ends up past the resultset"
if $dialect eq 'Top';
is ($books->page(2)->all, 1, "$test_type: Prefetched grouped search returns correct number of rows");
SQL
});
- TODO: {
+ {
my $freetds_and_dynamic_cursors = 1
if $opts_name eq 'use_dynamic_cursors' &&
$schema->storage->_using_freetds;