@oino-ts/db-mariadb 1.6.1 → 1.6.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.
@@ -104,7 +104,7 @@ class OINODbMariadb extends db_1.OINODb {
104
104
  if (this.dbParams.type !== "OINODbMariadb") {
105
105
  throw new Error(common_1.OINO_ERROR_PREFIX + ": Not OINODbMariadb-type: " + this.dbParams.type);
106
106
  }
107
- this._pool = mariadb_1.default.createPool({ host: this.dbParams.url, database: this.dbParams.database, port: this.dbParams.port, user: this.dbParams.user, password: this.dbParams.password, acquireTimeout: 2000, debug: false, rowsAsArray: true, multipleStatements: false }); // statements are now executed individually with bind parameters, so stacked/multi-statement execution is disabled
107
+ this._pool = mariadb_1.default.createPool({ host: this.dbParams.url, database: this.dbParams.database, port: this.dbParams.port, user: this.dbParams.user, password: this.dbParams.password, acquireTimeout: 2000, debug: false, rowsAsArray: true, autoJsonMap: false, multipleStatements: false }); // autoJsonMap=false: return JSON columns as their original text instead of parsed objects (which would serialize as "[object Object]"); statements are now executed individually with bind parameters, so stacked/multi-statement execution is disabled
108
108
  delete this.dbParams.password; // do not store password in db object
109
109
  }
110
110
  _parseFieldLength(fieldLengthStr) {
@@ -101,7 +101,7 @@ export class OINODbMariadb extends OINODb {
101
101
  if (this.dbParams.type !== "OINODbMariadb") {
102
102
  throw new Error(OINO_ERROR_PREFIX + ": Not OINODbMariadb-type: " + this.dbParams.type);
103
103
  }
104
- this._pool = mariadb.createPool({ host: this.dbParams.url, database: this.dbParams.database, port: this.dbParams.port, user: this.dbParams.user, password: this.dbParams.password, acquireTimeout: 2000, debug: false, rowsAsArray: true, multipleStatements: false }); // statements are now executed individually with bind parameters, so stacked/multi-statement execution is disabled
104
+ this._pool = mariadb.createPool({ host: this.dbParams.url, database: this.dbParams.database, port: this.dbParams.port, user: this.dbParams.user, password: this.dbParams.password, acquireTimeout: 2000, debug: false, rowsAsArray: true, autoJsonMap: false, multipleStatements: false }); // autoJsonMap=false: return JSON columns as their original text instead of parsed objects (which would serialize as "[object Object]"); statements are now executed individually with bind parameters, so stacked/multi-statement execution is disabled
105
105
  delete this.dbParams.password; // do not store password in db object
106
106
  }
107
107
  _parseFieldLength(fieldLengthStr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/db-mariadb",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "OINO TS package for using Mariadb databases.",
5
5
  "author": "Matias Kiviniemi (pragmatta)",
6
6
  "license": "MPL-2.0",
@@ -21,8 +21,8 @@
21
21
  "module": "./dist/esm/index.js",
22
22
  "types": "./dist/types/index.d.ts",
23
23
  "dependencies": {
24
- "@oino-ts/common": "^1.6.1",
25
- "@oino-ts/db": "^1.6.1",
24
+ "@oino-ts/common": "^1.6.2",
25
+ "@oino-ts/db": "^1.6.2",
26
26
  "mariadb": "^3.5.4"
27
27
  },
28
28
  "devDependencies": {
@@ -116,7 +116,7 @@ export class OINODbMariadb extends OINODb {
116
116
  if (this.dbParams.type !== "OINODbMariadb") {
117
117
  throw new Error(OINO_ERROR_PREFIX + ": Not OINODbMariadb-type: " + this.dbParams.type)
118
118
  }
119
- this._pool = mariadb.createPool({ host: this.dbParams.url, database: this.dbParams.database, port: this.dbParams.port, user: this.dbParams.user, password: this.dbParams.password, acquireTimeout: 2000, debug:false, rowsAsArray: true, multipleStatements: false }) // statements are now executed individually with bind parameters, so stacked/multi-statement execution is disabled
119
+ this._pool = mariadb.createPool({ host: this.dbParams.url, database: this.dbParams.database, port: this.dbParams.port, user: this.dbParams.user, password: this.dbParams.password, acquireTimeout: 2000, debug:false, rowsAsArray: true, autoJsonMap: false, multipleStatements: false }) // autoJsonMap=false: return JSON columns as their original text instead of parsed objects (which would serialize as "[object Object]"); statements are now executed individually with bind parameters, so stacked/multi-statement execution is disabled
120
120
  delete this.dbParams.password // do not store password in db object
121
121
  }
122
122