},
{
func => 'select',
+ args => ['test', '*', { foo => { '>=' => [] }} ],
+ throws => qr/\Qoperator '>=' applied on an empty array (field 'foo')/,
+ },
+ {
+ func => 'select',
new => {bindtype => 'columns'},
args => ['test', '*', { a => {-in => \["(SELECT d FROM to_date(?, 'MM/DD/YY') AS d)", [dummy => '02/02/02']]}, b => 8 }],
stmt => 'SELECT * FROM test WHERE ( a IN (SELECT d FROM to_date(?, \'MM/DD/YY\') AS d) AND b = ? )',
use strict;
use warnings;
use Test::More;
-use Test::Exception;
use SQL::Abstract::Test import => [qw(is_same_sql_bind diag_where) ];
use SQL::Abstract;
|| diag_where ( $case->{where} );
}
-dies_ok {
- my $sql = SQL::Abstract->new;
- $sql->where({ foo => { '>=' => [] }},);
-};
-
done_testing;