bind => [qw/1 2 3 4/, { answer => 42}],
warning_like => qr/HASH ref as bind value in insert is not supported/i,
},
+ #40
+ {
+ func => 'update',
+ args => ['test', {a => 1, b => \["42"]}, {a => {'between', [1,2]}}],
+ stmt => 'UPDATE test SET a = ?, b = 42 WHERE ( a BETWEEN ? AND ? )',
+ stmt_q => 'UPDATE `test` SET `a` = ?, `b` = 42 WHERE ( `a` BETWEEN ? AND ? )',
+ bind => [qw(1 1 2)],
+ },
+ #41
+ {
+ func => 'insert',
+ args => ['test', {a => 1, b => \["42"]}],
+ stmt => 'INSERT INTO test (a, b) VALUES (?, 42)',
+ stmt_q => 'INSERT INTO `test` (`a`, `b`) VALUES (?, 42)',
+ bind => [qw(1)],
+ },
+ #42
+ {
+ func => 'select',
+ args => ['test', '*', { a => \["= 42"], b => 1}],
+ stmt => q{SELECT * FROM test WHERE ( a = 42 ) AND (b = ? )},
+ stmt_q => q{SELECT * FROM `test` WHERE ( `a` = 42 ) AND ( `b` = ? )},
+ bind => [qw(1)],
+ },
+ #43
+ {
+ func => 'select',
+ args => ['test', '*', { a => {'<' => \["42"]}, b => 8 }],
+ stmt => 'SELECT * FROM test WHERE ( a < 42 AND b = ? )',
+ stmt_q => 'SELECT * FROM `test` WHERE ( `a` < 42 AND `b` = ? )',
+ bind => [qw(8)],
+ },
);