pg-promise 11.5.4 → 11.5.5
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/lib/database.js +1 -1
- package/lib/formatting.js +3 -2
- package/lib/main.js +1 -1
- package/lib/query.js +1 -3
- package/package.json +4 -4
package/lib/database.js
CHANGED
package/lib/formatting.js
CHANGED
|
@@ -839,7 +839,7 @@ const $as = {
|
|
|
839
839
|
* - `obj` - the formatting object, and is the same as `this` context
|
|
840
840
|
*
|
|
841
841
|
* - For $[Index Variables] formatting:
|
|
842
|
-
* - `index` - element's index (starts with 1) that's outside
|
|
842
|
+
* - `index` - element's index (starts with 1) that's outside the input array
|
|
843
843
|
* - `arr` - the formatting/input array, and is the same as `this` context
|
|
844
844
|
*
|
|
845
845
|
* You can tell which type of call it is by checking the type of the first parameter.
|
|
@@ -884,7 +884,8 @@ const $to = {
|
|
|
884
884
|
},
|
|
885
885
|
number(num) {
|
|
886
886
|
if (typeof num === 'bigint' || Number.isFinite(num)) {
|
|
887
|
-
|
|
887
|
+
const s = num.toString();
|
|
888
|
+
return num < 0 ? `(${s})` : s;
|
|
888
889
|
}
|
|
889
890
|
// Converting NaN/+Infinity/-Infinity according to Postgres documentation:
|
|
890
891
|
// http://www.postgresql.org/docs/9.6/static/datatype-numeric.html#DATATYPE-FLOAT
|
package/lib/main.js
CHANGED
package/lib/query.js
CHANGED
|
@@ -263,9 +263,7 @@ function $query(ctx, query, values, qrm, config) {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
// Extends Result to provide iterable for the rows;
|
|
266
|
-
//
|
|
267
|
-
// To be removed once the following PR is merged amd released:
|
|
268
|
-
// https://github.com/brianc/node-postgres/pull/2861
|
|
266
|
+
// See: https://github.com/brianc/node-postgres/pull/2861
|
|
269
267
|
function makeIterable(r) {
|
|
270
268
|
r[Symbol.iterator] = function () {
|
|
271
269
|
return this.rows.values();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-promise",
|
|
3
|
-
"version": "11.5.
|
|
3
|
+
"version": "11.5.5",
|
|
4
4
|
"description": "PostgreSQL interface for Node.js",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "typescript/pg-promise.d.ts",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"@types/node": "20.5.2",
|
|
51
51
|
"bluebird": "3.7.2",
|
|
52
52
|
"coveralls": "3.1.1",
|
|
53
|
-
"cspell": "
|
|
54
|
-
"eslint": "8.
|
|
53
|
+
"cspell": "8.6.0",
|
|
54
|
+
"eslint": "8.57.0",
|
|
55
55
|
"istanbul": "0.4.5",
|
|
56
56
|
"jasmine-node": "3.0.0",
|
|
57
57
|
"jsdoc": "4.0.2",
|
|
58
58
|
"JSONStream": "1.3.5",
|
|
59
59
|
"pg-query-stream": "4.5.3",
|
|
60
60
|
"tslint": "6.1.3",
|
|
61
|
-
"typescript": "5.
|
|
61
|
+
"typescript": "5.4.3"
|
|
62
62
|
}
|
|
63
63
|
}
|