6 use SQL::Abstract::Test import => [qw/is_same_sql_bind/];
9 for my $col_btype (0,1) {
11 my $sql_maker = SQL::Abstract->new(
13 name_sep => $q ? '.' : '',
14 $col_btype ? (bindtype => 'columns') : (),
17 my ($sql, @bind) = $sql_maker->select ('artist', '*', { arr1 => { -value => [1,2] }, arr2 => { '>', { -value => [3,4] } }, field => [5,6] } );
24 WHERE ${q}arr1${q} = ? AND
26 ( ${q}field${q} = ? OR ${q}field${q} = ? )
45 local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /Supplying an undefined argument to '(?:NOT )?LIKE'/ };
47 ($sql, @bind) = $sql_maker->where ({
49 c2 => { -value => undef },
50 c3 => { '=' => { -value => undef } },
51 c4 => { '!=' => { -value => undef } },
52 c5 => { '<>' => { -value => undef } },
53 c6 => { '-like' => { -value => undef } },
54 c7 => { '-not_like' => { -value => undef } },
55 c8 => { 'is' => { -value => undef } },
56 c9 => { 'is not' => { -value => undef } },
62 "WHERE ${q}c1${q} IS NULL
63 AND ${q}c2${q} IS NULL
64 AND ${q}c3${q} IS NULL
65 AND ${q}c4${q} IS NOT NULL
66 AND ${q}c5${q} IS NOT NULL
67 AND ${q}c6${q} IS NULL
68 AND ${q}c7${q} IS NOT NULL
69 AND ${q}c8${q} IS NULL
70 AND ${q}c9${q} IS NOT NULL