@oino-ts/db 0.16.0 → 0.16.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.
@@ -99,6 +99,9 @@ class OINODbModelSet {
99
99
  const fields = model.fields;
100
100
  let csv_header = "\"" + index_js_1.OINODbConfig.OINODB_ID_FIELD + "\"";
101
101
  for (let i = 0; i < fields.length; i++) {
102
+ if (this.sqlParams?.select?.isSelected(fields[i]) === false) {
103
+ continue;
104
+ }
102
105
  csv_header += ",\"" + fields[i].name + "\"";
103
106
  }
104
107
  return csv_header;
@@ -96,6 +96,9 @@ export class OINODbModelSet {
96
96
  const fields = model.fields;
97
97
  let csv_header = "\"" + OINODbConfig.OINODB_ID_FIELD + "\"";
98
98
  for (let i = 0; i < fields.length; i++) {
99
+ if (this.sqlParams?.select?.isSelected(fields[i]) === false) {
100
+ continue;
101
+ }
99
102
  csv_header += ",\"" + fields[i].name + "\"";
100
103
  }
101
104
  return csv_header;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/db",
3
- "version": "0.16.0",
3
+ "version": "0.16.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,13 +19,13 @@
19
19
  "module": "./dist/esm/index.js",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "dependencies": {
22
- "@oino-ts/common": "0.16.0",
22
+ "@oino-ts/common": "0.16.2",
23
23
  "oino-ts": "file:.."
24
24
  },
25
25
  "devDependencies": {
26
- "@oino-ts/types": "0.16.0",
26
+ "@oino-ts/types": "0.16.2",
27
27
  "@types/bun": "^1.1.14",
28
- "@types/node": "^20.16.00",
28
+ "@types/node": "^20.16.20",
29
29
  "typescript": "~5.9.0"
30
30
  },
31
31
  "files": [
@@ -108,6 +108,9 @@ export class OINODbModelSet {
108
108
  const fields:OINODbDataField[] = model.fields
109
109
  let csv_header:string = "\"" + OINODbConfig.OINODB_ID_FIELD + "\""
110
110
  for (let i=0; i<fields.length; i++) {
111
+ if (this.sqlParams?.select?.isSelected(fields[i]) === false) {
112
+ continue
113
+ }
111
114
  csv_header += ",\"" + fields[i].name + "\""
112
115
  }
113
116
  return csv_header