- Fix parsing of foo.* in SQLA::Tree
- Fix bindtype fail when using -between with arrayrefref literals
+ - Add handling for NULL for -in
revision 1.71 2010-11-09
----------------------------
if (@rest or $func !~ /^ \- (.+)/x);
local $self->{_nested_func_lhs} = $k;
$self->_where_unary_op ($1 => $arg);
- }
+ },
+ UNDEF => sub {
+ return $self->_sqlcase('null');
+ },
});
push @all_sql, $sql;
push @all_bind, @bind;
bind => [qw/A c/],
test => '-in with an array of function array refs with args',
},
+ {
+ where => { x => { -in => [ 1, undef ] } },
+ stmt => " WHERE ( x IN ( ?, NULL ) )",
+ bind => [ 1 ],
+ 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 ],
+ test => '-in with undef as an element',
+ },
);
plan tests => @in_between_tests*4;