Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit da83eff

Browse files
committed
revert(execute): transaction api
Somebody, somewhere, will experience compatibility issues with any change made to oxmysql.
1 parent 57bf223 commit da83eff

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/database/rawExecute.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export const rawExecute = async (
2424
const connection = await pool.promise().getConnection();
2525

2626
try {
27-
if (type !== null) await connection.beginTransaction();
2827
const placeholders = query.split('?').length - 1;
2928

3029
for (let values of parameters as CFXParameters[]) {
@@ -45,10 +44,7 @@ export const rawExecute = async (
4544
}
4645

4746
single = response.length === 1;
48-
if (type !== null) connection.commit();
4947
} catch (err: any) {
50-
if (connection && type !== null) connection.rollback();
51-
5248
throw new Error(`${invokingResource} was unable to execute a query!
5349
${err.message}
5450
${err.sql}`);

0 commit comments

Comments
 (0)