mirror of
https://github.com/knex/knex.git
synced 2025-07-03 07:04:07 +00:00
13 lines
316 B
JavaScript
13 lines
316 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;
|