$op, $self->_ident_to_dq($k), $self->_literal_to_dq($$rhs)
);
}
- return $self->_literal_to_dq($self->{sqlfalse}) unless @$rhs;
+ return $self->_literal_to_dq(
+ $op =~ /^NOT/ ? $self->{sqltrue} : $self->{sqlfalse}
+ ) unless @$rhs;
return $self->_op_to_dq(
$op, $self->_ident_to_dq($k), map $self->_expr_to_dq($_), @$rhs
)
stmt_q => 'SELECT * FROM `test` WHERE ( `Y` = ( MAX( LENGTH( MIN ? ) ) ) )',
bind => [[Y => 'x']],
},
+ {
+ 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 => [],
+ },
);
for my $t (@tests) {