}
};
if ($op eq 'BETWEEN' or $op eq 'IN' or $op eq 'NOT IN' or $op eq 'NOT BETWEEN') {
+ $rhs = [$rhs] unless ref $rhs;
if (ref($rhs) ne 'ARRAY') {
if ($op =~ /IN$/) {
# have to add parens if none present because -in => \"SELECT ..."
},
{
func => 'select',
- args => ['test', '*', { a => { -in => [] }, b => { -not_in => [] } }],
- stmt => 'SELECT * FROM test WHERE ( 0=1 AND 1=1 )',
- stmt_q => 'SELECT * FROM `test` WHERE ( 0=1 AND 1=1 )',
- bind => [],
+ args => ['test', '*', { a => { -in => [] }, b => { -not_in => [] }, c => { -in => 42 } }],
+ stmt => 'SELECT * FROM test WHERE ( 0=1 AND 1=1 AND c IN ( ? ))',
+ stmt_q => 'SELECT * FROM `test` WHERE ( 0=1 AND 1=1 AND `c` IN ( ? ))',
+ bind => [ 42 ],
},
);