Skip to content

Commit 5091a7b

Browse files
committed
Add support for using PGTransaction as a store
1 parent c80edfb commit 5091a7b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strontium",
3-
"version": "2.9.8",
3+
"version": "2.9.9",
44
"description": "Strontium is a TypeScript toolkit for High Performance API servers built for Production not Projects.",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",

src/query/drivers/sql/TableRepository.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
MySQLStore,
55
MySQLTransaction,
66
PGStore,
7+
PGTransaction,
78
SQLStore,
89
} from "../../../datastore"
910
import { injectable } from "inversify"
@@ -37,7 +38,7 @@ export abstract class TableRepository<
3738
) {
3839
super()
3940

40-
if (store instanceof PGStore) {
41+
if (store instanceof PGStore || store instanceof PGTransaction) {
4142
this.postProcessor = pgQueryPostProcessor
4243
this.tableName = `"${this.tableName}"`
4344
}

0 commit comments

Comments
 (0)