mirror of
https://github.com/knex/knex.git
synced 2025-06-26 22:00:25 +00:00
13 lines
319 B
JavaScript
13 lines
319 B
JavaScript
const Transaction = require('../../../execution/transaction');
|
|
|
|
class Transaction_PG extends Transaction {
|
|
begin(conn) {
|
|
if (this.isolationLevel) {
|
|
return this.query(conn, `BEGIN ISOLATION LEVEL ${this.isolationLevel};`);
|
|
}
|
|
return this.query(conn, 'BEGIN;');
|
|
}
|
|
}
|
|
|
|
module.exports = Transaction_PG;
|