{
parenthesis_significant => 1,
where => { x => { -in => \['( ( ?,?,lower(y) ) )', 1, 2] } },
- stmt => "WHERE ( x IN ( ( ?,?,lower(y) ) ) )", # note that outer parens are opened even though literal was requested (RIBASUSHI)
+ stmt => "WHERE ( x IN ( ?,?,lower(y) ) )", # note that outer parens are opened even though literal was requested (RIBASUSHI)
bind => [1, 2],
test => '-in with a literal arrayrefref',
},
parenthesis_significant => 1,
where => {
customer => { -in => \[
- '( SELECT cust_id FROM cust WHERE balance > ? )',
+ 'SELECT cust_id FROM cust WHERE balance > ?',
2000,
]},
- status => { -in => \'( SELECT status_codes FROM states )' },
+ status => { -in => \'SELECT status_codes FROM states' },
},
stmt => "
WHERE ((
},
{
where => { x => { -in => [ 1, undef ] } },
- stmt => " WHERE ( x IN ( ?, NULL ) )",
- bind => [ 1 ],
+ stmt => " WHERE ( x IN ( ?, ? ) )",
+ bind => [ 1, undef ],
test => '-in with undef as an element',
},
{
where => { x => { -in => [ 1, undef, 2, 3, undef ] } },
- stmt => " WHERE ( x IN ( ?, NULL, ?, ?, NULL ) )",
- bind => [ 1, 2, 3 ],
+ stmt => " WHERE ( x IN ( ?, ?, ?, ?, ? ) )",
+ bind => [ 1, undef, 2, 3, undef ],
test => '-in with undef as an element',
},
);
-plan tests => @in_between_tests*3;
-
for my $case (@in_between_tests) {
TODO: {
local $TODO = $case->{todo} if $case->{todo};
diag "Error: $e\n Search term:\n".Dumper($case->{where}) if $e;
}
}
+
+done_testing;