@graffy/pg 0.15.23-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 +3 -0
- package/index.mjs +3 -0
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -299,6 +299,9 @@ function getBinarySql(lhs, type, op, value, textLhs) {
|
|
|
299
299
|
return sql__default["default"]`${lhs} ${sqlOp} ${String(value)}`;
|
|
300
300
|
}
|
|
301
301
|
if (type === "jsonb") {
|
|
302
|
+
if (typeof value === "string") {
|
|
303
|
+
return sql__default["default"]`${textLhs} ${sqlOp} ${value}`;
|
|
304
|
+
}
|
|
302
305
|
return sql__default["default"]`${lhs} ${sqlOp} ${JSON.stringify(value)}::jsonb`;
|
|
303
306
|
}
|
|
304
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.23
|
|
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.23
|
|
19
|
+
"@graffy/common": "0.15.23",
|
|
20
20
|
"sql-template-tag": "^4.1.0",
|
|
21
21
|
"debug": "^4.3.3"
|
|
22
22
|
},
|