forge-sql-orm 2.1.9 → 2.1.10
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.
- package/dist/ForgeSQLORM.js +3 -7
- package/dist/ForgeSQLORM.js.map +1 -1
- package/dist/ForgeSQLORM.mjs +3 -7
- package/dist/ForgeSQLORM.mjs.map +1 -1
- package/dist/core/ForgeSQLORM.d.ts +5 -5
- package/dist/core/ForgeSQLORM.d.ts.map +1 -1
- package/dist/core/ForgeSQLQueryBuilder.d.ts +29 -5
- package/dist/core/ForgeSQLQueryBuilder.d.ts.map +1 -1
- package/dist/lib/drizzle/extensions/additionalActions.d.ts +30 -6
- package/dist/lib/drizzle/extensions/additionalActions.d.ts.map +1 -1
- package/dist/utils/forgeDriver.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/core/ForgeSQLORM.ts +1 -1
- package/src/core/ForgeSQLQueryBuilder.ts +53 -8
- package/src/lib/drizzle/extensions/additionalActions.ts +231 -18
- package/src/utils/forgeDriver.ts +3 -8
package/dist/ForgeSQLORM.mjs
CHANGED
|
@@ -1088,7 +1088,7 @@ async function processDDLResult(method, result) {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
if (Array.isArray(result.rows)) {
|
|
1090
1090
|
if (method === "execute") {
|
|
1091
|
-
return { rows: result.rows };
|
|
1091
|
+
return { rows: [result.rows] };
|
|
1092
1092
|
} else {
|
|
1093
1093
|
const rows = result.rows.map((r) => Object.values(r));
|
|
1094
1094
|
return { rows };
|
|
@@ -1103,13 +1103,9 @@ async function processExecuteMethod(query, params) {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
const result = await withTimeout$1(sqlStatement.execute());
|
|
1105
1105
|
await saveMetaDataToContext(result.metadata);
|
|
1106
|
-
if (!result
|
|
1106
|
+
if (!result.rows) {
|
|
1107
1107
|
return { rows: [[]] };
|
|
1108
1108
|
}
|
|
1109
|
-
if (isUpdateQueryResponse(result.rows)) {
|
|
1110
|
-
const oneRow = result.rows;
|
|
1111
|
-
return { rows: [oneRow] };
|
|
1112
|
-
}
|
|
1113
1109
|
return { rows: [result.rows] };
|
|
1114
1110
|
}
|
|
1115
1111
|
async function processAllMethod(query, params) {
|
|
@@ -1119,7 +1115,7 @@ async function processAllMethod(query, params) {
|
|
|
1119
1115
|
}
|
|
1120
1116
|
const result = await withTimeout$1(sqlStatement.execute());
|
|
1121
1117
|
await saveMetaDataToContext(result.metadata);
|
|
1122
|
-
if (!result
|
|
1118
|
+
if (!result.rows) {
|
|
1123
1119
|
return { rows: [] };
|
|
1124
1120
|
}
|
|
1125
1121
|
const rows = result.rows.map((r) => Object.values(r));
|