@deterministic-code/datasources-mysql 0.1.15 → 0.1.18
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/MysqlDriver.js
CHANGED
|
@@ -2,16 +2,18 @@ import { BinaryConverter } from "./BinaryConverter.js";
|
|
|
2
2
|
import { BoolConverter } from "./BoolConverter.js";
|
|
3
3
|
import { DateTimeConverter } from "./DateTimeConverter.js";
|
|
4
4
|
import { DecimalConverter } from "./DecimalConverter.js";
|
|
5
|
+
import { IntegerConverter } from "./IntegerConverter.js";
|
|
5
6
|
import { UuidConverter } from "./UuidConverter.js";
|
|
6
7
|
export const MysqlRowTypeConverters = {
|
|
7
|
-
|
|
8
|
+
boolean: new BoolConverter(),
|
|
8
9
|
datetime: new DateTimeConverter(),
|
|
9
10
|
uuid: new UuidConverter(),
|
|
10
11
|
decimal: new DecimalConverter(),
|
|
11
12
|
binary: new BinaryConverter(),
|
|
13
|
+
integer: new IntegerConverter(),
|
|
12
14
|
};
|
|
13
15
|
export const reverse = (value) => typeof value === "boolean"
|
|
14
|
-
? MysqlRowTypeConverters.
|
|
16
|
+
? MysqlRowTypeConverters.boolean.reverseConvert(value)
|
|
15
17
|
: value instanceof Date
|
|
16
18
|
|| (typeof value === "string" && /^\d{4}-\d{2}-\d{2}T/.test(value))
|
|
17
19
|
? MysqlRowTypeConverters.datetime.reverseConvert(value)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deterministic-code/datasources-mysql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@deterministic-code/datasources": "^0.1.
|
|
21
|
+
"@deterministic-code/datasources": "^0.1.18",
|
|
22
22
|
"mysql2": "^3.14.0"
|
|
23
23
|
}
|
|
24
24
|
}
|