select_all => 'SELECT id, name FROM names',
delete_all => 'DELETE FROM names',
select_one => 'SELECT id, name FROM names WHERE id = ?',
- insert_one => 'INSERT INTO names (name) VALUES (?)',# RETURNING (id)',
+ insert_one => sub {
+ my ($store, undef, $dbh, $args) = @_;
+ $store->_sth_for($dbh, 'INSERT INTO names (name) VALUES (?)', $args);
+ [ $dbh->last_insert_id(undef,undef,undef,undef) ];
+ },
update_one => 'UPDATE names SET name = ? WHERE id = ?',
delete_one => 'DELETE FROM names WHERE id = ?',
},