openTransaction method

Future openTransaction(
  1. Future queryBlock(
    1. PostgreSQLConnectionTransactionWrapper connection
    ), {
  2. int? commitTimeoutInSeconds,
})

Implementation

Future openTransaction(
  Future Function(PostgreSQLConnectionTransactionWrapper connection)
      queryBlock, {
  int? commitTimeoutInSeconds,
}) {
  var conn = nativeConnection as PostgreSQLConnection;
  updateLastAccessTime();
  return conn.transaction((transactionContext) => queryBlock(
      PostgreSQLConnectionTransactionWrapper(this, transactionContext)));
}