sedentary-pg 0.0.32 → 0.0.33
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/cjs/pgdb.js +4 -0
- package/dist/es/pgdb.js +5 -1
- package/package.json +7 -7
package/dist/cjs/pgdb.js
CHANGED
|
@@ -22,6 +22,10 @@ const needUsing = [
|
|
|
22
22
|
];
|
|
23
23
|
const types = { int2: "SMALLINT", int4: "INTEGER", int8: "BIGINT", timestamptz: "DATETIME", varchar: "VARCHAR" };
|
|
24
24
|
const actions = { cascade: "c", "no action": "a", restrict: "r", "set default": "d", "set null": "n" };
|
|
25
|
+
function parseInt8(value) {
|
|
26
|
+
return BigInt(value);
|
|
27
|
+
}
|
|
28
|
+
pg_1.types.setTypeParser(20, parseInt8);
|
|
25
29
|
class PGDB extends sedentary_1.DB {
|
|
26
30
|
constructor(connection, log) {
|
|
27
31
|
super(log);
|
package/dist/es/pgdb.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatabaseError, Pool } from "pg";
|
|
1
|
+
import { DatabaseError, Pool, types as PGtypes } from "pg";
|
|
2
2
|
import format from "pg-format";
|
|
3
3
|
import { DB, Transaction } from "sedentary";
|
|
4
4
|
import { adsrc } from "./adsrc";
|
|
@@ -16,6 +16,10 @@ const needUsing = [
|
|
|
16
16
|
];
|
|
17
17
|
const types = { int2: "SMALLINT", int4: "INTEGER", int8: "BIGINT", timestamptz: "DATETIME", varchar: "VARCHAR" };
|
|
18
18
|
const actions = { cascade: "c", "no action": "a", restrict: "r", "set default": "d", "set null": "n" };
|
|
19
|
+
function parseInt8(value) {
|
|
20
|
+
return BigInt(value);
|
|
21
|
+
}
|
|
22
|
+
PGtypes.setTypeParser(20, parseInt8);
|
|
19
23
|
export class PGDB extends DB {
|
|
20
24
|
client;
|
|
21
25
|
indexes;
|
package/package.json
CHANGED
|
@@ -9,20 +9,20 @@
|
|
|
9
9
|
"@types/pg": "8.6.5",
|
|
10
10
|
"pg": "8.7.3",
|
|
11
11
|
"pg-format": "1.0.4",
|
|
12
|
-
"sedentary": "0.0.
|
|
12
|
+
"sedentary": "0.0.33"
|
|
13
13
|
},
|
|
14
14
|
"description": "The ORM which never needs to migrate - PostgreSQL",
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/mocha": "9.1.0",
|
|
17
|
-
"@types/node": "17.0.
|
|
17
|
+
"@types/node": "17.0.24",
|
|
18
18
|
"@types/pg-format": "1.0.2",
|
|
19
19
|
"@types/yamljs": "0.2.31",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
21
|
-
"@typescript-eslint/parser": "5.
|
|
22
|
-
"eslint": "8.
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "5.19.0",
|
|
21
|
+
"@typescript-eslint/parser": "5.19.0",
|
|
22
|
+
"eslint": "8.13.0",
|
|
23
23
|
"mocha": "9.2.2",
|
|
24
24
|
"nyc": "15.1.0",
|
|
25
|
-
"prettier": "2.6.
|
|
25
|
+
"prettier": "2.6.2",
|
|
26
26
|
"ts-node": "10.7.0",
|
|
27
27
|
"typescript": "4.6.3",
|
|
28
28
|
"yamljs": "0.3.0"
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"types": "./dist/types/index.d.ts",
|
|
87
|
-
"version": "0.0.
|
|
87
|
+
"version": "0.0.33"
|
|
88
88
|
}
|