Transaction abstract class
Start a transaction by using ConnectionPool.startTransaction. Once a transaction is started it retains its connection until the transaction is committed or rolled back. You must use the commit and rollback methods to do this, otherwise the connection will not be released back to the pool.
abstract class Transaction extends QueriableConnection { /** * Commits the transaction and released the connection. An error will be thrown * if any queries are executed after calling commit. */ Future commit(); /** * Rolls back the transaction and released the connection. An error will be thrown * if any queries are executed after calling rollback. */ Future rollback(); }
Extends
QueriableConnection > Transaction
Methods
abstract Future commit() #
Commits the transaction and released the connection. An error will be thrown if any queries are executed after calling commit.
abstract Future<Query> prepare(String sql) #
inherited from QueriableConnection
Prepares a query with the given
sql. Returns a [Future
abstract Future<Results> prepareExecute(String sql, List<dynamic> parameters) #
inherited from QueriableConnection
abstract Future<Results> query(String sql) #
inherited from QueriableConnection