@zintrust/db-mysql 0.1.20 → 0.1.21
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/index.d.ts +1 -0
- package/dist/index.js +7 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -46,7 +46,13 @@ function normalizeQueryResult(raw) {
|
|
|
46
46
|
const affectedRows = typeof maybe.affectedRows === 'number' && Number.isFinite(maybe.affectedRows)
|
|
47
47
|
? maybe.affectedRows
|
|
48
48
|
: 0;
|
|
49
|
-
|
|
49
|
+
const insertId = (typeof maybe.insertId === 'number' ||
|
|
50
|
+
typeof maybe.insertId === 'string' ||
|
|
51
|
+
typeof maybe.insertId === 'bigint') &&
|
|
52
|
+
maybe.insertId !== 0 // Only return if valid ID
|
|
53
|
+
? maybe.insertId
|
|
54
|
+
: undefined;
|
|
55
|
+
return { rows: [], rowCount: affectedRows, lastInsertId: insertId };
|
|
50
56
|
}
|
|
51
57
|
return { rows: [], rowCount: 0 };
|
|
52
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zintrust/db-mysql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"node": ">=20.0.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@zintrust/core": "^0.1.
|
|
25
|
+
"@zintrust/core": "^0.1.21"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|