@fedify/postgres 2.0.28 → 2.0.29-dev.2018
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/kv.cjs +2 -1
- package/dist/kv.js +2 -1
- package/package.json +3 -3
package/dist/kv.cjs
CHANGED
|
@@ -58,11 +58,12 @@ var PostgresKvStore = class {
|
|
|
58
58
|
async set(key, value, options) {
|
|
59
59
|
await this.initialize();
|
|
60
60
|
const ttl = options?.ttl == null ? null : options.ttl.toString();
|
|
61
|
+
const jsonValue = value === null ? this.#sql`'null'::jsonb` : this.#json(value);
|
|
61
62
|
await this.#sql`
|
|
62
63
|
INSERT INTO ${this.#sql(this.#tableName)} (key, value, ttl)
|
|
63
64
|
VALUES (
|
|
64
65
|
${key},
|
|
65
|
-
${
|
|
66
|
+
${jsonValue},
|
|
66
67
|
${ttl}
|
|
67
68
|
)
|
|
68
69
|
ON CONFLICT (key)
|
package/dist/kv.js
CHANGED
|
@@ -57,11 +57,12 @@ var PostgresKvStore = class {
|
|
|
57
57
|
async set(key, value, options) {
|
|
58
58
|
await this.initialize();
|
|
59
59
|
const ttl = options?.ttl == null ? null : options.ttl.toString();
|
|
60
|
+
const jsonValue = value === null ? this.#sql`'null'::jsonb` : this.#json(value);
|
|
60
61
|
await this.#sql`
|
|
61
62
|
INSERT INTO ${this.#sql(this.#tableName)} (key, value, ttl)
|
|
62
63
|
VALUES (
|
|
63
64
|
${key},
|
|
64
|
-
${
|
|
65
|
+
${jsonValue},
|
|
65
66
|
${ttl}
|
|
66
67
|
)
|
|
67
68
|
ON CONFLICT (key)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/postgres",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.29-dev.2018+2e67253f",
|
|
4
4
|
"description": "PostgreSQL drivers for Fedify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fedify",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"postgres": "^3.4.7",
|
|
77
|
-
"@fedify/fedify": "^2.0.
|
|
77
|
+
"@fedify/fedify": "^2.0.29-dev.2018+2e67253f"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@std/async": "npm:@jsr/std__async@^1.0.13",
|
|
81
81
|
"tsdown": "^0.21.6",
|
|
82
82
|
"typescript": "^6.0.0",
|
|
83
83
|
"@fedify/fixture": "^2.0.0",
|
|
84
|
-
"@fedify/testing": "^2.0.
|
|
84
|
+
"@fedify/testing": "^2.0.29-dev.2018+2e67253f"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build:self": "tsdown",
|