@faasjs/knex 0.0.4-beta.6 → 0.0.4-beta.7

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/index.js CHANGED
@@ -95,17 +95,13 @@ var Knex = class {
95
95
  this.adapter = knex__default.default(this.config);
96
96
  if (this.config.client === "pg") {
97
97
  const pg = __require("pg");
98
- const intTypes = ["INT2", "INT4", "INT8"];
99
- intTypes.forEach(
100
- (t) => pg.types.setTypeParser(pg.types.builtins[t], (v) => parseInt(v))
101
- );
102
- const floatTypes = ["FLOAT4", "FLOAT8", "NUMERIC"];
103
- floatTypes.forEach(
104
- (t) => pg.types.setTypeParser(
98
+ for (const t of ["INT2", "INT4", "INT8"])
99
+ pg.types.setTypeParser(pg.types.builtins[t], (v) => parseInt(v));
100
+ for (const t of ["FLOAT4", "FLOAT8", "NUMERIC"])
101
+ pg.types.setTypeParser(
105
102
  pg.types.builtins[t],
106
103
  (v) => parseFloat(v)
107
- )
108
- );
104
+ );
109
105
  }
110
106
  this.query = this.adapter;
111
107
  this.query.on("query", ({ sql, __knexQueryUid, bindings }) => {
package/dist/index.mjs CHANGED
@@ -89,17 +89,13 @@ var Knex = class {
89
89
  this.adapter = knex(this.config);
90
90
  if (this.config.client === "pg") {
91
91
  const pg = __require("pg");
92
- const intTypes = ["INT2", "INT4", "INT8"];
93
- intTypes.forEach(
94
- (t) => pg.types.setTypeParser(pg.types.builtins[t], (v) => parseInt(v))
95
- );
96
- const floatTypes = ["FLOAT4", "FLOAT8", "NUMERIC"];
97
- floatTypes.forEach(
98
- (t) => pg.types.setTypeParser(
92
+ for (const t of ["INT2", "INT4", "INT8"])
93
+ pg.types.setTypeParser(pg.types.builtins[t], (v) => parseInt(v));
94
+ for (const t of ["FLOAT4", "FLOAT8", "NUMERIC"])
95
+ pg.types.setTypeParser(
99
96
  pg.types.builtins[t],
100
97
  (v) => parseFloat(v)
101
- )
102
- );
98
+ );
103
99
  }
104
100
  this.query = this.adapter;
105
101
  this.query.on("query", ({ sql, __knexQueryUid, bindings }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/knex",
3
- "version": "0.0.4-beta.6",
3
+ "version": "0.0.4-beta.7",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,9 +21,9 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "@faasjs/deep_merge": "0.0.4-beta.6",
25
- "@faasjs/func": "0.0.4-beta.6",
26
- "@faasjs/logger": "0.0.4-beta.6"
24
+ "@faasjs/deep_merge": "0.0.4-beta.7",
25
+ "@faasjs/func": "0.0.4-beta.7",
26
+ "@faasjs/logger": "0.0.4-beta.7"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "knex": "*"