sedentary-pg 0.0.33 → 0.0.34

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
@@ -18,9 +18,10 @@ const needDrop = [
18
18
  const needUsing = [
19
19
  ["DATETIME", "varchar"],
20
20
  ["INT", "varchar"],
21
- ["INT8", "varchar"]
21
+ ["INT8", "varchar"],
22
+ ["NUMBER", "varchar"]
22
23
  ];
23
- const types = { int2: "SMALLINT", int4: "INTEGER", int8: "BIGINT", timestamptz: "DATETIME", varchar: "VARCHAR" };
24
+ const types = { int2: "SMALLINT", int4: "INTEGER", int8: "BIGINT", numeric: "NUMERIC", timestamptz: "DATETIME", varchar: "VARCHAR" };
24
25
  const actions = { cascade: "c", "no action": "a", restrict: "r", "set default": "d", "set null": "n" };
25
26
  function parseInt8(value) {
26
27
  return BigInt(value);
@@ -282,6 +283,8 @@ class PGDB extends sedentary_1.DB {
282
283
  switch (type) {
283
284
  case "DATETIME":
284
285
  return ["DATETIME", "TIMESTAMP (3) WITH TIME ZONE"];
286
+ case "NUMBER":
287
+ return ["NUMERIC", "NUMERIC"];
285
288
  case "INT":
286
289
  ret = size === 2 ? "SMALLINT" : "INTEGER";
287
290
  return [ret, ret];
package/dist/es/pgdb.js CHANGED
@@ -12,9 +12,10 @@ const needDrop = [
12
12
  const needUsing = [
13
13
  ["DATETIME", "varchar"],
14
14
  ["INT", "varchar"],
15
- ["INT8", "varchar"]
15
+ ["INT8", "varchar"],
16
+ ["NUMBER", "varchar"]
16
17
  ];
17
- const types = { int2: "SMALLINT", int4: "INTEGER", int8: "BIGINT", timestamptz: "DATETIME", varchar: "VARCHAR" };
18
+ const types = { int2: "SMALLINT", int4: "INTEGER", int8: "BIGINT", numeric: "NUMERIC", timestamptz: "DATETIME", varchar: "VARCHAR" };
18
19
  const actions = { cascade: "c", "no action": "a", restrict: "r", "set default": "d", "set null": "n" };
19
20
  function parseInt8(value) {
20
21
  return BigInt(value);
@@ -280,6 +281,8 @@ export class PGDB extends DB {
280
281
  switch (type) {
281
282
  case "DATETIME":
282
283
  return ["DATETIME", "TIMESTAMP (3) WITH TIME ZONE"];
284
+ case "NUMBER":
285
+ return ["NUMERIC", "NUMERIC"];
283
286
  case "INT":
284
287
  ret = size === 2 ? "SMALLINT" : "INTEGER";
285
288
  return [ret, ret];
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.33"
12
+ "sedentary": "0.0.34"
13
13
  },
14
14
  "description": "The ORM which never needs to migrate - PostgreSQL",
15
15
  "devDependencies": {
@@ -84,5 +84,5 @@
84
84
  }
85
85
  },
86
86
  "types": "./dist/types/index.d.ts",
87
- "version": "0.0.33"
87
+ "version": "0.0.34"
88
88
  }