Open wilzbach opened 7 years ago
See also:
http://docs.sqlalchemy.org/en/rel_1_1/orm/session_transaction.html?highlight=transaction http://docs.peewee-orm.com/en/latest/peewee/transactions.html?highlight=transaction https://docs.ponyorm.com/transactions.html?highlight=transaction http://knexjs.org/#Transactions http://docs.sequelizejs.com/en/latest/docs/transactions/ http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html
The following works now:
// scoped struct with destructor
with (conn.transaction) {
auto result = query(`SELECT * from "Foo" Limit 1`);
foreach (row; result)
writeln(row);
}
// scoped lambda
conn.transaction({
auto result = conn.query(`SELECT * from "Foo" Limit 1`);
foreach (row; result)
writeln(row);
});
See also: https://github.com/dvigal/ddb/blob/f283ebb3fbb8d3c811a39721cff282587154812f/source/ddb/transaction.d
@atomic
UDA?rollbackTo
savepoint
(create new transaction?)txid