File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,7 @@ export class PGStore implements Process, SQLStore {
36
36
}
37
37
38
38
public async createTransaction (
39
- options ?: {
40
- isolation_level ?: PGIsolationLevel
41
- }
39
+ isolationLevel ?: PGIsolationLevel
42
40
) : Promise < PGTransaction > {
43
41
if ( this . connection === undefined ) {
44
42
throw new Error (
@@ -47,9 +45,11 @@ export class PGStore implements Process, SQLStore {
47
45
}
48
46
49
47
let connection = await this . connection . connect ( )
48
+
49
+ // By default, use PostgreSQL default isolation level (READ COMMITTED)
50
50
let query = "BEGIN"
51
- if ( options !== undefined && options . isolation_level !== undefined ) {
52
- switch ( options . isolation_level ) {
51
+ if ( isolationLevel !== undefined ) {
52
+ switch ( isolationLevel ) {
53
53
case PGIsolationLevel . SERIALIZABLE :
54
54
query = "BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE"
55
55
break
Original file line number Diff line number Diff line change 1
1
/**
2
- * The standarized levels used across all Logger integrations
2
+ * The standardize levels used across all Logger integrations
3
3
*/
4
4
export enum LogLevel {
5
5
/**
You can’t perform that action at this time.
0 commit comments