@oino-ts/db-mariadb 0.5.1 → 0.5.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.
|
@@ -250,7 +250,7 @@ class OINODbMariadb extends db_1.OINODb {
|
|
|
250
250
|
else if (sqlValue === undefined) {
|
|
251
251
|
return undefined;
|
|
252
252
|
}
|
|
253
|
-
else if (((sqlType == "date")) && (typeof (sqlValue) == "string")) {
|
|
253
|
+
else if (((sqlType == "date")) && (typeof (sqlValue) == "string") && (sqlValue != "")) {
|
|
254
254
|
return new Date(sqlValue);
|
|
255
255
|
}
|
|
256
256
|
else if ((sqlType == "bit") && (sqlValue instanceof Buffer)) { // mariadb returns a buffer for bit-fields
|
|
@@ -247,7 +247,7 @@ export class OINODbMariadb extends OINODb {
|
|
|
247
247
|
else if (sqlValue === undefined) {
|
|
248
248
|
return undefined;
|
|
249
249
|
}
|
|
250
|
-
else if (((sqlType == "date")) && (typeof (sqlValue) == "string")) {
|
|
250
|
+
else if (((sqlType == "date")) && (typeof (sqlValue) == "string") && (sqlValue != "")) {
|
|
251
251
|
return new Date(sqlValue);
|
|
252
252
|
}
|
|
253
253
|
else if ((sqlType == "bit") && (sqlValue instanceof Buffer)) { // mariadb returns a buffer for bit-fields
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oino-ts/db-mariadb",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "OINO TS package for using Mariadb databases.",
|
|
5
5
|
"author": "Matias Kiviniemi (pragmatta)",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"module": "./dist/esm/index.js",
|
|
22
22
|
"types": "./dist/types/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@oino-ts/db": "^0.5.
|
|
24
|
+
"@oino-ts/db": "^0.5.2",
|
|
25
25
|
"mariadb": "^3.2.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
package/src/OINODbMariadb.ts
CHANGED
|
@@ -264,7 +264,7 @@ export class OINODbMariadb extends OINODb {
|
|
|
264
264
|
} else if (sqlValue === undefined) {
|
|
265
265
|
return undefined
|
|
266
266
|
|
|
267
|
-
} else if (((sqlType == "date")) && (typeof(sqlValue) == "string")) {
|
|
267
|
+
} else if (((sqlType == "date")) && (typeof(sqlValue) == "string") && (sqlValue != "")) {
|
|
268
268
|
return new Date(sqlValue)
|
|
269
269
|
|
|
270
270
|
} else if ((sqlType == "bit") && (sqlValue instanceof Buffer)) { // mariadb returns a buffer for bit-fields
|