sedentary-pg 0.0.34 → 0.0.35

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 CHANGED
@@ -26,7 +26,11 @@ const actions = { cascade: "c", "no action": "a", restrict: "r", "set default":
26
26
  function parseInt8(value) {
27
27
  return BigInt(value);
28
28
  }
29
+ function parseNumber(value) {
30
+ return parseFloat(value);
31
+ }
29
32
  pg_1.types.setTypeParser(20, parseInt8);
33
+ pg_1.types.setTypeParser(1700, parseNumber);
30
34
  class PGDB extends sedentary_1.DB {
31
35
  constructor(connection, log) {
32
36
  super(log);
@@ -392,7 +396,6 @@ class PGDB extends sedentary_1.DB {
392
396
  await this.client.query(statement);
393
397
  }
394
398
  async syncTable(table) {
395
- var _a;
396
399
  if (table.autoIncrement) {
397
400
  await (async () => {
398
401
  try {
@@ -445,7 +448,7 @@ class PGDB extends sedentary_1.DB {
445
448
  if (this.sync)
446
449
  await this.client.query(statement);
447
450
  const resTable = await this.client.query("SELECT oid FROM pg_class WHERE relname = $1", [table.tableName]);
448
- table.oid = (_a = resTable.rows[0]) === null || _a === void 0 ? void 0 : _a.oid;
451
+ table.oid = resTable.rows[0]?.oid;
449
452
  }
450
453
  }
451
454
  }
package/dist/es/pgdb.js CHANGED
@@ -20,7 +20,11 @@ const actions = { cascade: "c", "no action": "a", restrict: "r", "set default":
20
20
  function parseInt8(value) {
21
21
  return BigInt(value);
22
22
  }
23
+ function parseNumber(value) {
24
+ return parseFloat(value);
25
+ }
23
26
  PGtypes.setTypeParser(20, parseInt8);
27
+ PGtypes.setTypeParser(1700, parseNumber);
24
28
  export class PGDB extends DB {
25
29
  client;
26
30
  indexes;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "@types/pg": "8.6.5",
10
10
  "pg": "8.7.3",
11
11
  "pg-format": "1.0.4",
12
- "sedentary": "0.0.34"
12
+ "sedentary": "0.0.35"
13
13
  },
14
14
  "description": "The ORM which never needs to migrate - PostgreSQL",
15
15
  "devDependencies": {
@@ -71,7 +71,7 @@
71
71
  "compilerOptions": {
72
72
  "alwaysStrict": true,
73
73
  "esModuleInterop": true,
74
- "moduleResolution": "node",
74
+ "moduleResolution": "Node",
75
75
  "noImplicitAny": true,
76
76
  "noImplicitReturns": true,
77
77
  "noImplicitThis": true,
@@ -80,9 +80,9 @@
80
80
  "strictFunctionTypes": true,
81
81
  "strictNullChecks": true,
82
82
  "strictPropertyInitialization": true,
83
- "target": "esnext"
83
+ "target": "ESNext"
84
84
  }
85
85
  },
86
86
  "types": "./dist/types/index.d.ts",
87
- "version": "0.0.34"
87
+ "version": "0.0.35"
88
88
  }