forge-sql-orm 2.1.8 → 2.1.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forge-sql-orm",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "Drizzle ORM integration for Atlassian @forge/sql. Provides a custom driver, schema migration, two levels of caching (local and global via @forge/kvs), optimistic locking, and query analysis.",
|
|
5
5
|
"main": "dist/ForgeSQLORM.js",
|
|
6
6
|
"module": "dist/ForgeSQLORM.mjs",
|
package/src/utils/forgeDriver.ts
CHANGED
|
@@ -150,16 +150,16 @@ async function processExecuteMethod(query: string, params: unknown[]): Promise<F
|
|
|
150
150
|
|
|
151
151
|
const result = await withTimeout(sqlStatement.execute());
|
|
152
152
|
await saveMetaDataToContext(result.metadata as ForgeSQLMetadata);
|
|
153
|
-
if (!result?.rows
|
|
154
|
-
return { rows: [
|
|
153
|
+
if (!result?.rows) {
|
|
154
|
+
return { rows: [[]] };
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
if (isUpdateQueryResponse(result.rows)) {
|
|
158
158
|
const oneRow = result.rows as any;
|
|
159
|
-
return {
|
|
159
|
+
return { rows: [oneRow] };
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
return { rows: result.rows };
|
|
162
|
+
return { rows: [result.rows] };
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
/**
|