@graffy/pg 0.15.22-alpha.1 → 0.15.23
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/index.cjs +4 -2
- package/index.mjs +3 -0
- package/package.json +2 -2
- package/types/sql/clauses.d.ts +0 -1
package/index.cjs
CHANGED
|
@@ -27,8 +27,7 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
}
|
|
28
28
|
return target;
|
|
29
29
|
};
|
|
30
|
-
Object.
|
|
31
|
-
exports[Symbol.toStringTag] = "Module";
|
|
30
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
32
31
|
var common = require("@graffy/common");
|
|
33
32
|
var pg$1 = require("pg");
|
|
34
33
|
var sql = require("sql-template-tag");
|
|
@@ -300,6 +299,9 @@ function getBinarySql(lhs, type, op, value, textLhs) {
|
|
|
300
299
|
return sql__default["default"]`${lhs} ${sqlOp} ${String(value)}`;
|
|
301
300
|
}
|
|
302
301
|
if (type === "jsonb") {
|
|
302
|
+
if (typeof value === "string") {
|
|
303
|
+
return sql__default["default"]`${textLhs} ${sqlOp} ${value}`;
|
|
304
|
+
}
|
|
303
305
|
return sql__default["default"]`${lhs} ${sqlOp} ${JSON.stringify(value)}::jsonb`;
|
|
304
306
|
}
|
|
305
307
|
if (type === "cube")
|
package/index.mjs
CHANGED
|
@@ -292,6 +292,9 @@ function getBinarySql(lhs, type, op, value, textLhs) {
|
|
|
292
292
|
return sql`${lhs} ${sqlOp} ${String(value)}`;
|
|
293
293
|
}
|
|
294
294
|
if (type === "jsonb") {
|
|
295
|
+
if (typeof value === "string") {
|
|
296
|
+
return sql`${textLhs} ${sqlOp} ${value}`;
|
|
297
|
+
}
|
|
295
298
|
return sql`${lhs} ${sqlOp} ${JSON.stringify(value)}::jsonb`;
|
|
296
299
|
}
|
|
297
300
|
if (type === "cube")
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graffy/pg",
|
|
3
3
|
"description": "The standard Postgres module for Graffy. Each instance this module mounts a Postgres table as a Graffy subtree.",
|
|
4
4
|
"author": "aravind (https://github.com/aravindet)",
|
|
5
|
-
"version": "0.15.
|
|
5
|
+
"version": "0.15.23",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"exports": {
|
|
8
8
|
"import": "./index.mjs",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@graffy/common": "0.15.
|
|
19
|
+
"@graffy/common": "0.15.23",
|
|
20
20
|
"sql-template-tag": "^4.1.0",
|
|
21
21
|
"debug": "^4.3.3"
|
|
22
22
|
},
|
package/types/sql/clauses.d.ts
CHANGED