stmt => 'INSERT INTO test (a, b, c, d, e) VALUES (?, ?, ?, ?, ?)',
stmt_q => 'INSERT INTO `test` (`a`, `b`, `c`, `d`, `e`) VALUES (?, ?, ?, ?, ?)',
bind => [qw/1 2 3 4/, { answer => 42}],
- warns => qr/HASH ref as bind value in insert is not supported/i,
+ warns => qr/use -value/i,
},
{
func => 'update',
},
{
func => 'insert',
+ args => ['test', [ { -value => { foo => 'bar' } } ] ],
+ stmt => 'INSERT INTO test VALUES (?)',
+ stmt_q => 'INSERT INTO `test` VALUES (?)',
+ bind => [ { foo => 'bar' } ],
+ },
+ {
+ func => 'insert',
args => ['test', [qw/1 2 3 4 5/], { returning => 'id' }],
stmt => 'INSERT INTO test VALUES (?, ?, ?, ?, ?) RETURNING id',
stmt_q => 'INSERT INTO `test` VALUES (?, ?, ?, ?, ?) RETURNING `id`',