@reddb-io/client
Advanced tools
+1
-1
| { | ||
| "name": "@reddb-io/client", | ||
| "version": "1.20.0-rc.183", | ||
| "version": "1.20.0-rc.187", | ||
| "description": "Thin remote-only RedDB driver. Downloads the `red_client` binary on install. Speaks RedWire/gRPC/HTTP. Embedded URIs (memory://, file://, red:///path) are rejected — use @reddb-io/sdk for those.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+7
-1
@@ -12,3 +12,3 @@ import { RedDBError } from './protocol.js' | ||
| const result = await this.db.query( | ||
| `INSERT INTO ${sqlIdentifierPath(collection)} DOCUMENT (body) VALUES (${sqlJsonLiteral(document)}) RETURNING *`, | ||
| `INSERT INTO ${sqlIdentifierPath(collection)} DOCUMENT VALUES (${sqlJsonInlineLiteral(document)}) RETURNING *`, | ||
| ) | ||
@@ -117,2 +117,8 @@ const item = result.rows?.[0] | ||
| // ADR 0067 (#1709): a document body is written as an inline strict-JSON | ||
| // literal (no surrounding quotes) — the quoted-string coercion is removed. | ||
| function sqlJsonInlineLiteral(value) { | ||
| return JSON.stringify(value) | ||
| } | ||
| function sqlValueLiteral(value) { | ||
@@ -119,0 +125,0 @@ if (value == null) return 'NULL' |
244298
0.09%6245
0.08%