Skip to content

Commit 5bf6de2

Browse files
author
Felix Robles
committed
export isolation levels, simplify transaction options
1 parent 9d20735 commit 5bf6de2

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

src/datastore/abstract/PGTransactionOptions.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/datastore/drivers/pg/PGStore.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { PGIsolationLevel } from "../../abstract/PGIsolationLevel"
22
import { PGTransaction } from "./PGTransaction"
3-
import { PGTransactionOptions } from "../../abstract/PGTransactionOptions"
43
import { SQLStore } from "../../abstract/SQLStore"
54
import { Container } from "inversify"
65
import { Logger } from "../../../logging"
@@ -37,7 +36,9 @@ export class PGStore implements Process, SQLStore {
3736
}
3837

3938
public async createTransaction(
40-
options?: Partial<PGTransactionOptions>
39+
options?: {
40+
isolation_level?: PGIsolationLevel
41+
}
4142
): Promise<PGTransaction> {
4243
if (this.connection === undefined) {
4344
throw new Error(

src/datastore/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export * from "./abstract/SQLStore"
2+
export * from "./abstract/PGIsolationLevel"
23

34
export * from "./drivers/mysql/MySQLStore"
45
export * from "./drivers/mysql/MySQLTransaction"

0 commit comments

Comments
 (0)