@oino-ts/db 0.13.1 → 0.13.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.
|
@@ -238,6 +238,9 @@ class OINODbModelSet {
|
|
|
238
238
|
let result = {};
|
|
239
239
|
for (let i = 0; i < fields.length; i++) {
|
|
240
240
|
const f = fields[i];
|
|
241
|
+
if (f.fieldParams.isPrimaryKey) {
|
|
242
|
+
primary_key_values.push(f.serializeCell(row[i]) || "");
|
|
243
|
+
}
|
|
241
244
|
if (this.sqlParams?.select?.isSelected(f) === false) {
|
|
242
245
|
continue;
|
|
243
246
|
}
|
|
@@ -235,6 +235,9 @@ export class OINODbModelSet {
|
|
|
235
235
|
let result = {};
|
|
236
236
|
for (let i = 0; i < fields.length; i++) {
|
|
237
237
|
const f = fields[i];
|
|
238
|
+
if (f.fieldParams.isPrimaryKey) {
|
|
239
|
+
primary_key_values.push(f.serializeCell(row[i]) || "");
|
|
240
|
+
}
|
|
238
241
|
if (this.sqlParams?.select?.isSelected(f) === false) {
|
|
239
242
|
continue;
|
|
240
243
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oino-ts/db",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "OINO TS library package for publishing an SQL database tables as a REST API.",
|
|
5
5
|
"author": "Matias Kiviniemi (pragmatta)",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"module": "./dist/esm/index.js",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@oino-ts/common": "0.13.
|
|
22
|
+
"@oino-ts/common": "0.13.2",
|
|
23
23
|
"oino-ts": "file:.."
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@oino-ts/types": "0.13.
|
|
26
|
+
"@oino-ts/types": "0.13.2",
|
|
27
27
|
"@types/bun": "^1.1.14",
|
|
28
28
|
"@types/node": "^20.14.10",
|
|
29
29
|
"typescript": "~5.9.0"
|
package/src/OINODbModelSet.ts
CHANGED
|
@@ -256,6 +256,9 @@ export class OINODbModelSet {
|
|
|
256
256
|
let result:any = {}
|
|
257
257
|
for (let i=0; i<fields.length; i++) {
|
|
258
258
|
const f = fields[i]
|
|
259
|
+
if (f.fieldParams.isPrimaryKey) {
|
|
260
|
+
primary_key_values.push(f.serializeCell(row[i]) || "")
|
|
261
|
+
}
|
|
259
262
|
if (this.sqlParams?.select?.isSelected(f) === false) {
|
|
260
263
|
continue
|
|
261
264
|
}
|