mythix-orm-postgresql 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -185,7 +185,7 @@ class PostgreSQLConnection extends SQLConnectionBase {
|
|
|
185
185
|
inheritedThis.inTransaction = client;
|
|
186
186
|
|
|
187
187
|
try {
|
|
188
|
-
await inheritedThis.query(`BEGIN${(options.mode) ? ` ${options.mode}` : ' DEFERRABLE'}
|
|
188
|
+
await inheritedThis.query(`BEGIN${(options.mode) ? ` ${options.mode}` : ' DEFERRABLE'}`, options);
|
|
189
189
|
} catch (error) {
|
|
190
190
|
if (!options.connection)
|
|
191
191
|
await client.release();
|
|
@@ -197,23 +197,23 @@ class PostgreSQLConnection extends SQLConnectionBase {
|
|
|
197
197
|
inheritedThis.savePointName = savePointName;
|
|
198
198
|
inheritedThis.isSavePoint = true;
|
|
199
199
|
|
|
200
|
-
await inheritedThis.query(`SAVEPOINT ${savePointName}
|
|
200
|
+
await inheritedThis.query(`SAVEPOINT ${savePointName}`, options);
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
try {
|
|
204
204
|
let result = await callback.call(inheritedThis, inheritedThis);
|
|
205
205
|
|
|
206
206
|
if (savePointName)
|
|
207
|
-
await inheritedThis.query(`RELEASE SAVEPOINT ${savePointName}
|
|
207
|
+
await inheritedThis.query(`RELEASE SAVEPOINT ${savePointName}`, options);
|
|
208
208
|
else
|
|
209
|
-
await inheritedThis.query('COMMIT');
|
|
209
|
+
await inheritedThis.query('COMMIT', options);
|
|
210
210
|
|
|
211
211
|
return result;
|
|
212
212
|
} catch (error) {
|
|
213
213
|
if (savePointName)
|
|
214
|
-
await inheritedThis.query(`ROLLBACK TO SAVEPOINT ${savePointName}
|
|
214
|
+
await inheritedThis.query(`ROLLBACK TO SAVEPOINT ${savePointName}`, options);
|
|
215
215
|
else if (inheritedThis.inTransaction)
|
|
216
|
-
await inheritedThis.query('ROLLBACK');
|
|
216
|
+
await inheritedThis.query('ROLLBACK', options);
|
|
217
217
|
|
|
218
218
|
throw error;
|
|
219
219
|
} finally {
|