@g9tm/lynxcontrols-sqlite 1.4.0
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/README.md +12 -0
- package/contract/cases.json +463 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/codecs/codecs.d.ts +68 -0
- package/dist/codecs/codecs.d.ts.map +1 -0
- package/dist/codecs/codecs.js +201 -0
- package/dist/codecs/codecs.js.map +1 -0
- package/dist/contract/run-contract.d.ts +94 -0
- package/dist/contract/run-contract.d.ts.map +1 -0
- package/dist/contract/run-contract.js +159 -0
- package/dist/contract/run-contract.js.map +1 -0
- package/dist/driver/types.d.ts +87 -0
- package/dist/driver/types.d.ts.map +1 -0
- package/dist/driver/types.js +14 -0
- package/dist/driver/types.js.map +1 -0
- package/dist/errors.d.ts +39 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +57 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/query/builders.d.ts +216 -0
- package/dist/query/builders.d.ts.map +1 -0
- package/dist/query/builders.js +490 -0
- package/dist/query/builders.js.map +1 -0
- package/dist/query/compile.d.ts +42 -0
- package/dist/query/compile.d.ts.map +1 -0
- package/dist/query/compile.js +307 -0
- package/dist/query/compile.js.map +1 -0
- package/dist/query/expr.d.ts +201 -0
- package/dist/query/expr.d.ts.map +1 -0
- package/dist/query/expr.js +247 -0
- package/dist/query/expr.js.map +1 -0
- package/dist/repo/audit.d.ts +19 -0
- package/dist/repo/audit.d.ts.map +1 -0
- package/dist/repo/audit.js +36 -0
- package/dist/repo/audit.js.map +1 -0
- package/dist/repo/repository.d.ts +233 -0
- package/dist/repo/repository.d.ts.map +1 -0
- package/dist/repo/repository.js +715 -0
- package/dist/repo/repository.js.map +1 -0
- package/dist/schema/columns.d.ts +115 -0
- package/dist/schema/columns.d.ts.map +1 -0
- package/dist/schema/columns.js +112 -0
- package/dist/schema/columns.js.map +1 -0
- package/dist/schema/entity.d.ts +135 -0
- package/dist/schema/entity.d.ts.map +1 -0
- package/dist/schema/entity.js +227 -0
- package/dist/schema/entity.js.map +1 -0
- package/dist/schema/policies.d.ts +89 -0
- package/dist/schema/policies.d.ts.map +1 -0
- package/dist/schema/policies.js +54 -0
- package/dist/schema/policies.js.map +1 -0
- package/dist/session/ambient.d.ts +32 -0
- package/dist/session/ambient.d.ts.map +1 -0
- package/dist/session/ambient.js +28 -0
- package/dist/session/ambient.js.map +1 -0
- package/dist/session/cache.d.ts +62 -0
- package/dist/session/cache.d.ts.map +1 -0
- package/dist/session/cache.js +239 -0
- package/dist/session/cache.js.map +1 -0
- package/dist/session/database.d.ts +221 -0
- package/dist/session/database.d.ts.map +1 -0
- package/dist/session/database.js +430 -0
- package/dist/session/database.js.map +1 -0
- package/dist/session/locator.d.ts +33 -0
- package/dist/session/locator.d.ts.map +1 -0
- package/dist/session/locator.js +39 -0
- package/dist/session/locator.js.map +1 -0
- package/dist/session/migrations.d.ts +75 -0
- package/dist/session/migrations.d.ts.map +1 -0
- package/dist/session/migrations.js +88 -0
- package/dist/session/migrations.js.map +1 -0
- package/dist/session/mutex.d.ts +7 -0
- package/dist/session/mutex.d.ts.map +1 -0
- package/dist/session/mutex.js +27 -0
- package/dist/session/mutex.js.map +1 -0
- package/dist/session/rows.d.ts +17 -0
- package/dist/session/rows.d.ts.map +1 -0
- package/dist/session/rows.js +52 -0
- package/dist/session/rows.js.map +1 -0
- package/dist/session/schema-setup.d.ts +21 -0
- package/dist/session/schema-setup.d.ts.map +1 -0
- package/dist/session/schema-setup.js +227 -0
- package/dist/session/schema-setup.js.map +1 -0
- package/dist/session/scope.d.ts +117 -0
- package/dist/session/scope.d.ts.map +1 -0
- package/dist/session/scope.js +233 -0
- package/dist/session/scope.js.map +1 -0
- package/dist/session/write-hooks.d.ts +84 -0
- package/dist/session/write-hooks.d.ts.map +1 -0
- package/dist/session/write-hooks.js +55 -0
- package/dist/session/write-hooks.js.map +1 -0
- package/dist/values/ids.d.ts +46 -0
- package/dist/values/ids.d.ts.map +1 -0
- package/dist/values/ids.js +84 -0
- package/dist/values/ids.js.map +1 -0
- package/dist/values/int64.d.ts +33 -0
- package/dist/values/int64.d.ts.map +1 -0
- package/dist/values/int64.js +105 -0
- package/dist/values/int64.js.map +1 -0
- package/dist/values/local-date-time.d.ts +61 -0
- package/dist/values/local-date-time.d.ts.map +1 -0
- package/dist/values/local-date-time.js +122 -0
- package/dist/values/local-date-time.js.map +1 -0
- package/dist/values/sql-value.d.ts +36 -0
- package/dist/values/sql-value.d.ts.map +1 -0
- package/dist/values/sql-value.js +70 -0
- package/dist/values/sql-value.js.map +1 -0
- package/package.json +27 -0
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @g9tm/lynxcontrols-sqlite
|
|
2
|
+
|
|
3
|
+
SQLite persistence for G9 Lynx apps (Android, iOS, Windows, macOS): lossless value codecs (int64 as decimal strings,
|
|
4
|
+
exact decimals, 100 ns date/times, BLOBs), a small driver contract with a data-only contract suite
|
|
5
|
+
(`contract/cases.json`), explicit entity descriptors, queries with MAUI's C# null semantics, repositories
|
|
6
|
+
(`select`/`insert`/`update`/`delete`/`table`), audit stamping, transactions with savepoints and busy retry, migrations,
|
|
7
|
+
initializers, interceptors, soft delete, always-filters, declarative indexes, conflict policies and commit-driven
|
|
8
|
+
caches. Drivers live in separate packages (`@g9tm/lynxcontrols-native`, `@g9tm/lynxcontrols-lynxtron`; tests: `@g9tm/lynxcontrols-testing/sqlite`).
|
|
9
|
+
|
|
10
|
+
Status: WP10 (core) and WP11 (N01–N10) implemented and tested against real SQLite. Guide:
|
|
11
|
+
[docs/persistence.md](docs/persistence.md); migration tables: [docs/migration/](docs/migration/); benchmark:
|
|
12
|
+
`npm run bench` → `bench/results/node.<platform>-<arch>.json` (one file per machine kind).
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "G9 SQLite driver contract (plan/specs/06-Native-Drivers.md §2). Data only: every driver (node-test, lynxtron, android, ios) runs these cases. Values: null, number, string, {\"int64\": \"…\"}, {\"blob\": \"hex\"}, {\"blobRepeat\": {\"byte\": n, \"count\": n}}, {\"real\": \"Infinity\"}, {\"undefined\": true}. Session 'a' is opened on a fresh file (create, WAL, busy_timeout 0) before each case.",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"cases": [
|
|
5
|
+
{
|
|
6
|
+
"id": "int64-extrema",
|
|
7
|
+
"group": "int64",
|
|
8
|
+
"steps": [
|
|
9
|
+
{ "run": [{ "sql": "CREATE TABLE t(v INTEGER)" }] },
|
|
10
|
+
{
|
|
11
|
+
"run": [
|
|
12
|
+
{
|
|
13
|
+
"sql": "INSERT INTO t VALUES (?),(?),(?),(?),(?),(?)",
|
|
14
|
+
"params": [
|
|
15
|
+
{ "int64": "9223372036854775807" },
|
|
16
|
+
{ "int64": "-9223372036854775808" },
|
|
17
|
+
{ "int64": "9007199254740992" },
|
|
18
|
+
{ "int64": "9007199254740993" },
|
|
19
|
+
{ "int64": "-9007199254740993" },
|
|
20
|
+
9007199254740991
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{ "sql": "SELECT v FROM t ORDER BY rowid" }
|
|
24
|
+
],
|
|
25
|
+
"expect": [
|
|
26
|
+
{ "changes": 6 },
|
|
27
|
+
{
|
|
28
|
+
"columns": ["v"],
|
|
29
|
+
"rows": [
|
|
30
|
+
[{ "int64": "9223372036854775807" }],
|
|
31
|
+
[{ "int64": "-9223372036854775808" }],
|
|
32
|
+
[{ "int64": "9007199254740992" }],
|
|
33
|
+
[{ "int64": "9007199254740993" }],
|
|
34
|
+
[{ "int64": "-9007199254740993" }],
|
|
35
|
+
[9007199254740991]
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "int64-bit63-masks",
|
|
44
|
+
"group": "int64",
|
|
45
|
+
"steps": [
|
|
46
|
+
{
|
|
47
|
+
"run": [
|
|
48
|
+
{
|
|
49
|
+
"sql": "SELECT ? & 9223372036854775807 AS low, ? | 0 AS high, (? + 1) AS next",
|
|
50
|
+
"params": [{ "int64": "-1" }, { "int64": "-9223372036854775808" }, { "int64": "9007199254740992" }]
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"expect": [
|
|
54
|
+
{
|
|
55
|
+
"columns": ["low", "high", "next"],
|
|
56
|
+
"rows": [
|
|
57
|
+
[
|
|
58
|
+
{ "int64": "9223372036854775807" },
|
|
59
|
+
{ "int64": "-9223372036854775808" },
|
|
60
|
+
{ "int64": "9007199254740993" }
|
|
61
|
+
]
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "safe-integers-are-numbers",
|
|
70
|
+
"group": "int64",
|
|
71
|
+
"steps": [
|
|
72
|
+
{
|
|
73
|
+
"run": [{ "sql": "SELECT typeof(?) AS t, ? AS v, -9007199254740991 AS m", "params": [42, 42] }],
|
|
74
|
+
"expect": [{ "columns": ["t", "v", "m"], "rows": [["integer", 42, -9007199254740991]] }]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "real-edges",
|
|
80
|
+
"group": "real",
|
|
81
|
+
"steps": [
|
|
82
|
+
{
|
|
83
|
+
"run": [
|
|
84
|
+
{
|
|
85
|
+
"sql": "SELECT ? AS a, ? AS b, ? AS c, ? AS d, ? AS e, ? AS f, typeof(?) AS g",
|
|
86
|
+
"params": [
|
|
87
|
+
1.7976931348623157e308,
|
|
88
|
+
5e-324,
|
|
89
|
+
-1.5,
|
|
90
|
+
0.30000000000000004,
|
|
91
|
+
{ "real": "Infinity" },
|
|
92
|
+
{ "real": "-Infinity" },
|
|
93
|
+
2.5
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"expect": [
|
|
98
|
+
{
|
|
99
|
+
"columns": ["a", "b", "c", "d", "e", "f", "g"],
|
|
100
|
+
"rows": [
|
|
101
|
+
[
|
|
102
|
+
1.7976931348623157e308,
|
|
103
|
+
5e-324,
|
|
104
|
+
-1.5,
|
|
105
|
+
0.30000000000000004,
|
|
106
|
+
{ "real": "Infinity" },
|
|
107
|
+
{ "real": "-Infinity" },
|
|
108
|
+
"real"
|
|
109
|
+
]
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "text-unicode",
|
|
118
|
+
"group": "text",
|
|
119
|
+
"steps": [
|
|
120
|
+
{ "run": [{ "sql": "CREATE TABLE t(v TEXT)" }] },
|
|
121
|
+
{
|
|
122
|
+
"run": [
|
|
123
|
+
{ "sql": "INSERT INTO t VALUES (?),(?),(?)", "params": ["سلام دنیا ۱۲۳", "👨👩👧 family", ""] },
|
|
124
|
+
{ "sql": "SELECT v, typeof(v) AS k, length(v) AS n FROM t ORDER BY rowid" }
|
|
125
|
+
],
|
|
126
|
+
"expect": [
|
|
127
|
+
{ "changes": 3 },
|
|
128
|
+
{
|
|
129
|
+
"columns": ["v", "k", "n"],
|
|
130
|
+
"rows": [["سلام دنیا ۱۲۳", "text", 13], ["👨👩👧 family", "text", 12], ["", "text", 0]]
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "text-with-nul-is-rejected",
|
|
138
|
+
"group": "text",
|
|
139
|
+
"steps": [
|
|
140
|
+
{ "run": [{ "sql": "CREATE TABLE t(v TEXT)" }] },
|
|
141
|
+
{ "run": [{ "sql": "INSERT INTO t VALUES (?)", "params": ["a\u0000b"] }], "expectError": "misuse" },
|
|
142
|
+
{ "run": [{ "sql": "SELECT COUNT(*) AS n FROM t" }], "expect": [{ "columns": ["n"], "rows": [[0]] }] }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "blob-empty-null-bytes",
|
|
147
|
+
"group": "blob",
|
|
148
|
+
"steps": [
|
|
149
|
+
{ "run": [{ "sql": "CREATE TABLE t(v BLOB)" }] },
|
|
150
|
+
{
|
|
151
|
+
"run": [
|
|
152
|
+
{
|
|
153
|
+
"sql": "INSERT INTO t VALUES (?),(?),(?),(?)",
|
|
154
|
+
"params": [{ "blob": "" }, null, { "blob": "00ff00ff" }, ""]
|
|
155
|
+
},
|
|
156
|
+
{ "sql": "SELECT v, typeof(v) AS k, length(v) AS n FROM t ORDER BY rowid" }
|
|
157
|
+
],
|
|
158
|
+
"expect": [
|
|
159
|
+
{ "changes": 4 },
|
|
160
|
+
{
|
|
161
|
+
"columns": ["v", "k", "n"],
|
|
162
|
+
"rows": [
|
|
163
|
+
[{ "blob": "" }, "blob", 0],
|
|
164
|
+
[null, "null", null],
|
|
165
|
+
[{ "blob": "00ff00ff" }, "blob", 4],
|
|
166
|
+
["", "text", 0]
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "blob-one-mebibyte",
|
|
175
|
+
"group": "blob",
|
|
176
|
+
"steps": [
|
|
177
|
+
{
|
|
178
|
+
"run": [
|
|
179
|
+
{
|
|
180
|
+
"sql": "SELECT ? AS v, length(?) AS n",
|
|
181
|
+
"params": [
|
|
182
|
+
{ "blobRepeat": { "byte": 171, "count": 1048576 } },
|
|
183
|
+
{ "blobRepeat": { "byte": 171, "count": 1048576 } }
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"expect": [
|
|
188
|
+
{ "columns": ["v", "n"], "rows": [[{ "blobRepeat": { "byte": 171, "count": 1048576 } }, 1048576]] }
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "null-versus-omitted",
|
|
195
|
+
"group": "null",
|
|
196
|
+
"steps": [
|
|
197
|
+
{ "run": [{ "sql": "CREATE TABLE t(a TEXT DEFAULT 'd', b TEXT)" }] },
|
|
198
|
+
{
|
|
199
|
+
"run": [
|
|
200
|
+
{ "sql": "INSERT INTO t(b) VALUES (?)", "params": ["omitted"] },
|
|
201
|
+
{ "sql": "INSERT INTO t(a, b) VALUES (?, ?)", "params": [null, "null"] },
|
|
202
|
+
{ "sql": "SELECT a, b FROM t ORDER BY rowid" }
|
|
203
|
+
],
|
|
204
|
+
"expect": [
|
|
205
|
+
{ "changes": 1 },
|
|
206
|
+
{ "changes": 1 },
|
|
207
|
+
{ "columns": ["a", "b"], "rows": [["d", "omitted"], [null, "null"]] }
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"id": "undefined-parameter-is-misuse",
|
|
214
|
+
"group": "null",
|
|
215
|
+
"steps": [{ "run": [{ "sql": "SELECT ? AS v", "params": [{ "undefined": true }] }], "expectError": "misuse" }]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"id": "nocase-guid-ids",
|
|
219
|
+
"group": "ids",
|
|
220
|
+
"steps": [
|
|
221
|
+
{ "run": [{ "sql": "CREATE TABLE t(Id TEXT COLLATE NOCASE PRIMARY KEY, v TEXT)" }] },
|
|
222
|
+
{
|
|
223
|
+
"run": [
|
|
224
|
+
{ "sql": "INSERT INTO t VALUES (?, ?)", "params": ["0f8fad5b-d9cb-469f-a165-70867728950e", "x"] },
|
|
225
|
+
{ "sql": "SELECT v FROM t WHERE Id = ?", "params": ["0F8FAD5B-D9CB-469F-A165-70867728950E"] }
|
|
226
|
+
],
|
|
227
|
+
"expect": [{ "changes": 1 }, { "columns": ["v"], "rows": [["x"]] }]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"run": [{ "sql": "INSERT INTO t VALUES (?, ?)", "params": ["0F8FAD5B-D9CB-469F-A165-70867728950E", "dup"] }],
|
|
231
|
+
"expectError": "constraint"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"id": "changes-and-last-insert-rowid",
|
|
237
|
+
"group": "changes",
|
|
238
|
+
"steps": [
|
|
239
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY, v INTEGER)" }] },
|
|
240
|
+
{
|
|
241
|
+
"run": [
|
|
242
|
+
{ "sql": "INSERT INTO t(v) VALUES (1)" },
|
|
243
|
+
{ "sql": "INSERT INTO t(v) VALUES (2)" },
|
|
244
|
+
{ "sql": "UPDATE t SET v = v + 10" },
|
|
245
|
+
{ "sql": "DELETE FROM t WHERE id = 99" },
|
|
246
|
+
{ "sql": "INSERT INTO t(id, v) VALUES (?, 3)", "params": [{ "int64": "9223372036854775807" }] }
|
|
247
|
+
],
|
|
248
|
+
"expect": [
|
|
249
|
+
{ "changes": 1, "lastInsertRowId": 1 },
|
|
250
|
+
{ "changes": 1, "lastInsertRowId": 2 },
|
|
251
|
+
{ "changes": 2 },
|
|
252
|
+
{ "changes": 0 },
|
|
253
|
+
{ "changes": 1, "lastInsertRowId": { "int64": "9223372036854775807" } }
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "atomic-batch-rolls-back-entirely",
|
|
260
|
+
"group": "batch",
|
|
261
|
+
"steps": [
|
|
262
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" }] },
|
|
263
|
+
{
|
|
264
|
+
"run": [{ "sql": "INSERT INTO t VALUES (1)" }, { "sql": "INSERT INTO t VALUES (1)" }],
|
|
265
|
+
"options": { "atomic": true },
|
|
266
|
+
"expectError": "constraint"
|
|
267
|
+
},
|
|
268
|
+
{ "run": [{ "sql": "SELECT COUNT(*) AS n FROM t" }], "expect": [{ "columns": ["n"], "rows": [[0]] }] }
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"id": "non-atomic-batch-keeps-completed-statements",
|
|
273
|
+
"group": "batch",
|
|
274
|
+
"steps": [
|
|
275
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" }] },
|
|
276
|
+
{
|
|
277
|
+
"run": [
|
|
278
|
+
{ "sql": "INSERT INTO t VALUES (1)" },
|
|
279
|
+
{ "sql": "INSERT INTO t VALUES (1)" },
|
|
280
|
+
{ "sql": "INSERT INTO t VALUES (2)" }
|
|
281
|
+
],
|
|
282
|
+
"expectError": "constraint",
|
|
283
|
+
"expectCompletedStatements": 1
|
|
284
|
+
},
|
|
285
|
+
{ "run": [{ "sql": "SELECT id FROM t" }], "expect": [{ "columns": ["id"], "rows": [[1]] }] }
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"id": "transaction-commit-and-rollback",
|
|
290
|
+
"group": "transactions",
|
|
291
|
+
"steps": [
|
|
292
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" }] },
|
|
293
|
+
{ "begin": "t1", "mode": "immediate" },
|
|
294
|
+
{ "run": [{ "sql": "INSERT INTO t VALUES (1)" }], "tx": "t1" },
|
|
295
|
+
{ "commit": "t1" },
|
|
296
|
+
{ "begin": "t2", "mode": "deferred" },
|
|
297
|
+
{ "run": [{ "sql": "INSERT INTO t VALUES (2)" }], "tx": "t2" },
|
|
298
|
+
{ "rollback": "t2" },
|
|
299
|
+
{ "run": [{ "sql": "SELECT id FROM t" }], "expect": [{ "columns": ["id"], "rows": [[1]] }] },
|
|
300
|
+
{ "run": [{ "sql": "SELECT 1" }], "tx": "t2", "expectError": "misuse" },
|
|
301
|
+
{ "commit": "t2", "expectError": "misuse" }
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"id": "run-outside-open-transaction-is-misuse",
|
|
306
|
+
"group": "transactions",
|
|
307
|
+
"steps": [
|
|
308
|
+
{ "begin": "t1", "mode": "deferred" },
|
|
309
|
+
{ "run": [{ "sql": "SELECT 1 AS v" }], "expectError": "misuse" },
|
|
310
|
+
{ "begin": "t2", "mode": "deferred", "expectError": "misuse" },
|
|
311
|
+
{ "rollback": "t1" }
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"id": "savepoints",
|
|
316
|
+
"group": "transactions",
|
|
317
|
+
"steps": [
|
|
318
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" }] },
|
|
319
|
+
{ "begin": "t1", "mode": "immediate" },
|
|
320
|
+
{
|
|
321
|
+
"run": [
|
|
322
|
+
{ "sql": "SAVEPOINT s1" },
|
|
323
|
+
{ "sql": "INSERT INTO t VALUES (1)" },
|
|
324
|
+
{ "sql": "ROLLBACK TO s1" },
|
|
325
|
+
{ "sql": "RELEASE s1" },
|
|
326
|
+
{ "sql": "INSERT INTO t VALUES (2)" }
|
|
327
|
+
],
|
|
328
|
+
"tx": "t1"
|
|
329
|
+
},
|
|
330
|
+
{ "commit": "t1" },
|
|
331
|
+
{ "run": [{ "sql": "SELECT id FROM t" }], "expect": [{ "columns": ["id"], "rows": [[2]] }] }
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"id": "rollback-after-trigger-activity",
|
|
336
|
+
"group": "transactions",
|
|
337
|
+
"steps": [
|
|
338
|
+
{
|
|
339
|
+
"run": [
|
|
340
|
+
{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" },
|
|
341
|
+
{ "sql": "CREATE TABLE g9_log(id INTEGER)" },
|
|
342
|
+
{ "sql": "CREATE TRIGGER g9_t_ai AFTER INSERT ON t BEGIN INSERT INTO g9_log VALUES (new.id); END" }
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
{ "begin": "t1", "mode": "immediate" },
|
|
346
|
+
{
|
|
347
|
+
"run": [{ "sql": "INSERT INTO t VALUES (7)" }, { "sql": "SELECT id FROM g9_log" }],
|
|
348
|
+
"tx": "t1",
|
|
349
|
+
"expect": [{ "changes": 1 }, { "columns": ["id"], "rows": [[7]] }]
|
|
350
|
+
},
|
|
351
|
+
{ "rollback": "t1" },
|
|
352
|
+
{ "run": [{ "sql": "SELECT COUNT(*) AS n FROM g9_log" }], "expect": [{ "columns": ["n"], "rows": [[0]] }] }
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"id": "constraint-codes",
|
|
357
|
+
"group": "errors",
|
|
358
|
+
"steps": [
|
|
359
|
+
{
|
|
360
|
+
"run": [
|
|
361
|
+
{ "sql": "CREATE TABLE p(id INTEGER PRIMARY KEY)" },
|
|
362
|
+
{
|
|
363
|
+
"sql": "CREATE TABLE c(id INTEGER PRIMARY KEY, p INTEGER NOT NULL REFERENCES p(id), n INTEGER CHECK (n > 0))"
|
|
364
|
+
}
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
{ "run": [{ "sql": "INSERT INTO c(id, p, n) VALUES (1, NULL, 1)" }], "expectError": "constraint" },
|
|
368
|
+
{ "run": [{ "sql": "INSERT INTO c(id, p, n) VALUES (1, 1, 0)" }], "expectError": "constraint" },
|
|
369
|
+
{
|
|
370
|
+
"run": [{ "sql": "PRAGMA foreign_keys=ON" }, { "sql": "INSERT INTO c(id, p, n) VALUES (1, 5, 1)" }],
|
|
371
|
+
"expectError": "constraint"
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"id": "syntax-error-is-other",
|
|
377
|
+
"group": "errors",
|
|
378
|
+
"steps": [{ "run": [{ "sql": "SELEC 1" }], "expectError": "other" }]
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"id": "busy-between-two-connections",
|
|
382
|
+
"group": "errors",
|
|
383
|
+
"steps": [
|
|
384
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" }] },
|
|
385
|
+
{ "open": "b", "options": { "pragmas": { "busyTimeoutMs": 0, "journalMode": "wal" } } },
|
|
386
|
+
{ "begin": "t1", "mode": "immediate" },
|
|
387
|
+
{ "run": [{ "sql": "INSERT INTO t VALUES (1)" }], "tx": "t1" },
|
|
388
|
+
{ "run": [{ "sql": "INSERT INTO t VALUES (2)" }], "session": "b", "expectError": "busy" },
|
|
389
|
+
{ "commit": "t1" },
|
|
390
|
+
{
|
|
391
|
+
"run": [{ "sql": "INSERT INTO t VALUES (2)" }, { "sql": "SELECT COUNT(*) AS n FROM t" }],
|
|
392
|
+
"session": "b",
|
|
393
|
+
"expect": [{ "changes": 1 }, { "columns": ["n"], "rows": [[2]] }]
|
|
394
|
+
},
|
|
395
|
+
{ "close": "b" }
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"id": "readonly-connection",
|
|
400
|
+
"group": "errors",
|
|
401
|
+
"steps": [
|
|
402
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" }, { "sql": "INSERT INTO t VALUES (1)" }] },
|
|
403
|
+
{ "open": "ro", "options": { "readOnly": true } },
|
|
404
|
+
{ "run": [{ "sql": "SELECT id FROM t" }], "session": "ro", "expect": [{ "columns": ["id"], "rows": [[1]] }] },
|
|
405
|
+
{ "run": [{ "sql": "INSERT INTO t VALUES (2)" }], "session": "ro", "expectError": "readonly" },
|
|
406
|
+
{ "close": "ro" }
|
|
407
|
+
]
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"id": "missing-file-without-create",
|
|
411
|
+
"group": "errors",
|
|
412
|
+
"steps": [{ "open": "missing", "missingPath": true, "options": { "create": false }, "expectError": "not-found" }]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"id": "create-makes-parent-directories",
|
|
416
|
+
"group": "lifecycle",
|
|
417
|
+
"steps": [
|
|
418
|
+
{ "open": "n", "nestedPath": true, "options": { "create": true } },
|
|
419
|
+
{
|
|
420
|
+
"run": [{ "sql": "CREATE TABLE t(id INTEGER)" }, { "sql": "INSERT INTO t VALUES (1)" }],
|
|
421
|
+
"session": "n",
|
|
422
|
+
"expect": [{ "changes": 0 }, { "changes": 1 }]
|
|
423
|
+
},
|
|
424
|
+
{ "close": "n" }
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"id": "max-rows-never-truncates",
|
|
429
|
+
"group": "limits",
|
|
430
|
+
"steps": [
|
|
431
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" }, { "sql": "INSERT INTO t VALUES (1),(2),(3)" }] },
|
|
432
|
+
{ "run": [{ "sql": "SELECT id FROM t" }], "options": { "maxRows": 2 }, "expectError": "too-many-rows" },
|
|
433
|
+
{
|
|
434
|
+
"run": [{ "sql": "SELECT id FROM t ORDER BY id" }],
|
|
435
|
+
"options": { "maxRows": 3 },
|
|
436
|
+
"expect": [{ "columns": ["id"], "rows": [[1], [2], [3]] }]
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"id": "cancelled-before-start-has-no-effect",
|
|
442
|
+
"group": "cancel",
|
|
443
|
+
"steps": [
|
|
444
|
+
{ "run": [{ "sql": "CREATE TABLE t(id INTEGER PRIMARY KEY)" }] },
|
|
445
|
+
{
|
|
446
|
+
"run": [{ "sql": "INSERT INTO t VALUES (1)" }],
|
|
447
|
+
"options": { "abortedSignal": true },
|
|
448
|
+
"expectError": "cancelled"
|
|
449
|
+
},
|
|
450
|
+
{ "run": [{ "sql": "SELECT COUNT(*) AS n FROM t" }], "expect": [{ "columns": ["n"], "rows": [[0]] }] }
|
|
451
|
+
]
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"id": "use-after-close",
|
|
455
|
+
"group": "lifecycle",
|
|
456
|
+
"steps": [
|
|
457
|
+
{ "close": "a" },
|
|
458
|
+
{ "run": [{ "sql": "SELECT 1" }], "expectError": "misuse" },
|
|
459
|
+
{ "begin": "t1", "mode": "deferred", "expectError": "misuse" }
|
|
460
|
+
]
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/animation.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@lynx-js/types/types/common/csstype.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/animation.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/element.d.ts","../../../node_modules/@lynx-js/types/types/common/events.d.ts","../../../node_modules/@lynx-js/types/types/common/system-info.d.ts","../../../node_modules/@lynx-js/types/types/common/performance.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/events.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/common/lynx.d.ts","../../../node_modules/@lynx-js/types/types/common/global.d.ts","../../../node_modules/@lynx-js/types/types/common/props.d.ts","../../../node_modules/@lynx-js/types/types/common/element/component.d.ts","../../../node_modules/@lynx-js/types/types/common/element/filter-image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/common.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list-item.d.ts","../../../node_modules/@lynx-js/types/types/common/element/page.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/text.d.ts","../../../node_modules/@lynx-js/types/types/common/element/view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/input.d.ts","../../../node_modules/@lynx-js/types/types/common/element/textarea.d.ts","../../../node_modules/@lynx-js/types/types/common/element/title-bar-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/svg.d.ts","../../../node_modules/@lynx-js/types/types/common/element/refresh.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-coordinator.d.ts","../../../node_modules/@lynx-js/types/types/common/element/viewpager.d.ts","../../../node_modules/@lynx-js/types/types/common/element/blur-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/webview.d.ts","../../../node_modules/@lynx-js/types/types/common/element/markdown.d.ts","../../../node_modules/@lynx-js/types/types/common/element/video.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx-performance-entry.d.ts","../../../node_modules/@lynx-js/types/types/common/element/frame.d.ts","../../../node_modules/@lynx-js/types/types/common/element/overlay.d.ts","../../../node_modules/@lynx-js/types/types/common/element/element.d.ts","../../../node_modules/@lynx-js/types/types/common/element/methods.d.ts","../../../node_modules/@lynx-js/types/types/common/element/attributes.d.ts","../../../node_modules/@lynx-js/types/types/common/element/index.d.ts","../../../node_modules/@lynx-js/types/types/common/console.d.ts","../../../node_modules/@lynx-js/types/types/common/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/event.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/nodes-ref.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/app.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/performance.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/fetch.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/native-modules.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/text-encoder-decoder.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/@lynx-js/react/runtime/jsx-runtime/index.d.ts","../../foundation/dist/collections.d.ts","../../foundation/dist/culture/digits.d.ts","../../foundation/dist/culture/culture.d.ts","../../foundation/dist/culture/calendar.d.ts","../../foundation/dist/culture/date-format.d.ts","../../foundation/dist/culture/duration.d.ts","../../foundation/dist/culture/numbers.d.ts","../../foundation/dist/culture/strings.d.ts","../../foundation/dist/culture/relative-time.d.ts","../../foundation/dist/culture/index.d.ts","../../foundation/dist/enums/index.d.ts","../../foundation/dist/errors.d.ts","../../foundation/dist/exec/diagnostics.d.ts","../../foundation/dist/services/abort.d.ts","../../foundation/dist/exec/options.d.ts","../../foundation/dist/services/clock.d.ts","../../foundation/dist/exec/trace.d.ts","../../foundation/dist/exec/safe-executor.d.ts","../../foundation/dist/exec/index.d.ts","../../foundation/dist/icons/generated/glyph-svg.d.ts","../../foundation/dist/icons/glyph.d.ts","../../foundation/dist/icons/icon.d.ts","../../foundation/dist/icons/glyph-slots.d.ts","../../foundation/dist/icons/icon-fonts.d.ts","../../foundation/dist/icons/svg.d.ts","../../foundation/dist/icons/index.d.ts","../../foundation/dist/services/preferences.d.ts","../../foundation/dist/services/contracts.d.ts","../../foundation/dist/services/index.d.ts","../../foundation/dist/theme/color.d.ts","../../foundation/dist/tokens/generated/palettes.d.ts","../../foundation/dist/theme/theme.d.ts","../../foundation/dist/theme/control-colors.d.ts","../../foundation/dist/theme/variants.d.ts","../../foundation/dist/theme/index.d.ts","../../foundation/dist/tokens/generated/metrics.d.ts","../../foundation/dist/tokens/layout-metrics.d.ts","../../foundation/dist/tokens/css-vars.d.ts","../../foundation/dist/tokens/index.d.ts","../../foundation/dist/index.d.ts","../src/errors.ts","../src/values/ids.ts","../src/values/int64.ts","../src/values/local-date-time.ts","../src/values/sql-value.ts","../src/codecs/codecs.ts","../src/driver/types.ts","../src/contract/run-contract.ts","../src/schema/columns.ts","../src/query/expr.ts","../src/schema/policies.ts","../src/schema/entity.ts","../src/query/compile.ts","../src/query/builders.ts","../src/repo/audit.ts","../src/session/ambient.ts","../src/session/locator.ts","../src/session/migrations.ts","../src/session/mutex.ts","../src/session/rows.ts","../src/session/schema-setup.ts","../src/session/write-hooks.ts","../src/session/database.ts","../src/session/cache.ts","../src/session/scope.ts","../src/repo/repository.ts","../src/index.ts"],"fileIdsList":[[40,94,95],[41,84,85,86],[52],[41,76,85,86,87,88,90,91,92],[41,84,85,86,88,89],[84,86],[41,84],[48,76],[42],[43],[50,54],[46],[40,50,54,55,56,57,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,77,78],[46,50,54,76],[46,50,54],[55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,77,78,79,80,81],[46,50,54,58],[46,59,62],[45],[47,51,52,93],[43,46,47,48,50,52,53,54,82,83],[43,46],[51,84,93],[44,84],[45,46,54],[44,45,49,50],[48,84],[37,38,39],[40],[99],[98],[98,99,100],[98,99,100,101,102,103,104,105],[104],[109,111,113,114],[110],[104,109,110,111,112,113],[109,112],[118],[117],[116,117,118,119,120,121],[97,106,107,108,115,122,125,131,135],[108,110,112,123],[110,112,123,124],[108],[126,128],[126,128,129,130],[126,127],[107,126,127],[127,132,133],[127,132,133,134],[96,137,138,139,140,141],[96,136,137,141,143],[96,136,141],[96,136],[96,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,157,158,159,160,161,162],[96,137,141,142,146,148,149],[96,137,140,141,142,146],[96,137,141,142,145],[96,138,140,148],[96,136,137,138,140,141,143,146,147,148,149,150,151,152,156,158,159,160,161],[96,139,140,142],[96,137,142,145,146,147],[96,137,146],[96,136,137,138,140],[96,137,147,148,159],[96,136,137,138,140,142,143,148,149,150,152,153,154,155,156,157,158,160],[96,137],[96,136,137,148],[96],[96,137,141,142,143,148,150],[96,137,140,142,143,146,148,149,154,156,159],[96,137,141,143,147,148,150,156,158,159,160,162],[96,136,137,146,148],[96,137,139]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"035312d4945d13efa134ae482f6dc56a1a9346f7ac3be7ccbad5741058ce87f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"07b03f752ae52a7130e06c5a8399d3a0dde07a1a634f8430b80cd6236c56b5c8","impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"acbac4ca6cd4b2b459debc4a274535775cb6278a8315be383fafa623ab78f18e","impliedFormat":1},{"version":"e421d0b097c78304a2597c1f33da586630e1dc665ae381c0c36e5ebc4aaf4566","impliedFormat":1},{"version":"adf624c89a0d509a789f3c0bf522969d2c47033dbeb50920b37cd89be475a65e","impliedFormat":1},{"version":"8ff8dade82d215fba372ec8ca795cb433997a41287e049acf294dd50cba08cc4","impliedFormat":1},{"version":"b32b532dcbe0a91d71fd94cb780e94bdfdce10be21608d914c29fb4b8939b24a","impliedFormat":1},{"version":"eb2b64881998b562a4fe9330e55aa2466cd3a41a1a57e93feac6555218cec06f","impliedFormat":1},{"version":"6db1694d205177322d792d924335b046b80607445a45c0d2de1fcffd190b48c0","impliedFormat":1},{"version":"2b47193137d251e8a5d4cea2d67fe85a68199795ba019e41d635f7cf5f8a35c5","impliedFormat":1},{"version":"f7e5c3960dd9df65d83408b9be446f7119fa1db1dd8266dd343349d90c3bf2ce","impliedFormat":1},{"version":"09c6491ed74af89a4155feafedecaf77780f5751c66d4b65b18d30fc0e053a75","impliedFormat":1},{"version":"188b01044640e5ef65f6edf0dd6e6454f02dd19f4ead66b9e03ebe26cc7298ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"c2be64f223b024c0b70c5096a8c361c9e11c7644f3bd8325d19c2720ee7087cd","impliedFormat":1},{"version":"5bf51107315834a209b08395b141e262b7d143d14f6b4e4d403d8e020cef7e32","impliedFormat":1},{"version":"db0dcbe48d5cb38315083b412c8ab6995b0d42dc73b286833e296827feb0e5b4","impliedFormat":1},{"version":"b3e4a49a3ba19463662e7b821544948b953d2f6708370d42406bda558084000c","impliedFormat":1},{"version":"90bebc017d1c8408719f5a056813cce04e171a53469c263a136c35076121bab0","impliedFormat":1},{"version":"0675f9dddf11b81ec71825d5d97fdd789e445003506255513e0fc829ebfb795a","impliedFormat":1},{"version":"32d1e153cac16ca3a3f5f6b68fae76cddcda509950fa00d038c465776359db0c","impliedFormat":1},{"version":"0d85d0fa55dd433acf924675d7e976c025c8521c91a76079844cd15e52855ccf","impliedFormat":1},{"version":"89da6ea3ee9735e712691227b0e5ee74381779f9ad8b0f4fb7ced0247b16735a","impliedFormat":1},{"version":"37f90d8b4384dae49b873e620b7fff15655c706105104809114ba98df6373124","impliedFormat":1},{"version":"7618f7fdf0abf7f712cefe766ac1ab7fcd1f8e753c513e57d3ada9ada3a57257","impliedFormat":1},{"version":"759df9936f492afeacebec2cea4efafdb647951e0e5edfc4c677ce2441eac9d0","impliedFormat":1},{"version":"8d8848528b40a84ab42200e89d08f3d5cd83efa275de1bb70ae38cb9e6fd5911","impliedFormat":1},{"version":"0e323630cbfda771430e2720f6a2f02f257becd8fb9722aa975ae773fb572210","impliedFormat":1},{"version":"56dbc770513baae28f7cfbadeba5078bb13a37a13132a5292e98a8b103312b98","impliedFormat":1},{"version":"84ff906032fe12e816bfb7441cee6726243e5a7316c4f2d6b0a6c149f1a91a16","impliedFormat":1},{"version":"a8641f25f667160f356c504936576de22899e50ea575d7a4da47fe3b3704dd93","impliedFormat":1},{"version":"dcbbe1fb0f2c0efc12e29db8bbccb5b82513384d01d7a55342065cb0611da272","impliedFormat":1},{"version":"af209189a194cf5ad1f7b22dd680b52843fec2e30f1283be20b2977872fd4424","impliedFormat":1},{"version":"14745f699217e89ff1034f7be978bc28c195472a597b5f36442ef83d954d47b0","impliedFormat":1},{"version":"10c1feac0328f8f90a81f348b7f3c6d3c3b3454e46fc045ba1a706406c58fd8e","impliedFormat":1},{"version":"f64cd565aca17df45f4666473da75e4ce51a2610e2ed1c31198e9f9325747a24","impliedFormat":1},{"version":"e415a17ab6a413d6be640457231e045541405eab1f0f370c7dd1e5567aa25999","impliedFormat":1},{"version":"8c03a41d6dc701b6648db83d71a92dc27147d7677ab5d70f32675e7e37b3795a","impliedFormat":1},{"version":"09c18bc60888c58e8f4568b6ca973af72613a8a01e7b213aab778e910ae18b2f","impliedFormat":1},{"version":"5258d7af58615ea380d959cbcb6d83cb7b9841b8c8267f5a0fcb36c092dadbdb","impliedFormat":1},{"version":"b2d74af681f440a07e714ae9a33e3ea49c79870b9674058114c0404d2aa2f190","impliedFormat":1},{"version":"24f31e43eb3505e5d2946315e7b8ee8b426dfbe92c3031e435a4eb2d9dd8d69f","affectsGlobalScope":true,"impliedFormat":1},{"version":"679f7b45a77210e6dd0d72a4b81fd177868d2eacfd8ee6919ce6babd7512562d","impliedFormat":1},{"version":"c669ee7ba01fa6a60b17c3535f96b65fa82dfd2a475a8760364f2f3952f9bcbd","impliedFormat":1},{"version":"a8b121f6a75d603075e62793ff0c109112e882dd6ca2b70bdccbd8d8f753429b","impliedFormat":1},{"version":"f378d7ed5e3ecbe382ade55127a9c98e826c76f786e06effad6fde91a7023d55","impliedFormat":1},{"version":"4e3e9539df72b3bfcc56fa13140070020dac72f1eff39237b11253482cb99847","impliedFormat":1},{"version":"5a47b3a2bbe2c9b015fe356462afe0abe391c592fffbe277126e2415e0811967","impliedFormat":1},{"version":"a3e797c70a421cda37cdea4349dced37dceb1611669652d9c4c5523467a55cbf","impliedFormat":1},{"version":"9164e652ff4e7cbd993ca20acd0e2ad7e1cb775a7aefc577b506cf588763ec42","impliedFormat":1},{"version":"e52840670587e82e129c9bfc6a2f42d9c2f2e1fd6ce176fea998383a8c941ea5","impliedFormat":1},{"version":"31ca1ee726f5d7c7709913b98be76fc40fdfaaca6ad7fafc222108981e11227c","impliedFormat":1},{"version":"556db73da59f5162cdf5c7ea1bc3b063b6ccb758078ef6517ad6f6e4ae7b199a","impliedFormat":1},{"version":"0a2c8ef08611f5a5f711c7b10ba70d10dc1c6af0c9dba8168cbbf34911b74188","impliedFormat":1},{"version":"1d6ef45145a9939a43062fe18188d4f7bdfdf4547978e1f6b7c9089fe53e81e5","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"509a86836776d5c821901abc16a2d21de674d2c8943ceb8d018049bf324bc56c","impliedFormat":99},"d533d1fe3018752aa47ee74ae5dbdca34377441b891176ad99bd33366a64372f","44b82e4f46178400732ea809a906f7ffb9dd38efab331ca23e7ca4586bf903ef","d3dcff003bac57338c3e60be409d0ff167ec1ff513539a5534c7679332dbc992","16d64c89cec74fa23e8cee7c72acc7549f117dcf7845051870c40366c7522d09","11f9f682c02d51de68eed569f8de1e91c56df296a78f3a6c520b93d52aac2308","28b43630d8d29a300e1e5b0f5efb04c8f994d372fff1b653ce8bb70d4e011e1a","b06c48902c3d127098839c1a6500f41d3e21b2f07f277ba7de23ec730df7275d","94659c94bb0ae17efde21aaf59f2beb05d286bea13f2d3b2b288a6df4faeac18","a7a0e658ca429cfb5268d4bf2e2e6e9fe871ffd06b6588d65424ba4eba35338f","ab4c80cb9cf211a7cd100429cb4a823c5bd9f3618bf981e6504c6606abf08656","e60dd3f69310681e28813b910da7d57f5cf0078feccfd683d22a29b45bb7a035","ccd708c3fff99b4ec315e14315dce6b9e85f4c96d10131e9fd219edb6efbdb26","abc924fce33b86b9f8588de3a5be04c609fafa6cb1dc42629b3e9e3e18f7d018","f919e3a8b2d274b631ee4fee0c50eba1d3f39ceaccba04dff915e9f61e9f153c","3ae17ae844491c7326d070c3e70a94a9239394e7a1e84eb203eb1d57470e752e","d1b2970d348eb9f89ef0f0c6730d27e9331067a28f21c8bd667ba1138d5d3e93","b2c4833e6308888c3947953770b3343deaf4276c803bb36148991a3fb90b4f6a","41b7c8204ea79a93e380a228f5c744e9c9a80183133ac62633a4c76e3fdbd7db","d0a441df587b0632c16a813117f110574d903ddd0bc4d28599cc82ff8af7c094","b24ac81f4fcff56ed9827736abcf2f92ea5f86e16d66eb2ee3ccfa0bb8143bc9","068309ff581d08c276c4a772ddf3ab9c8090e591fc9917fdc6cdffc12c95a5bf","5c1d368a451520260ebb6c06121201f18abf86d80540290df6e424d372c5d0ed","bb3ccaacf5c19a7170939b7f735c6a94537fd95ad16b4247a6ad572b23183e74","2c8b86d9d29c4ea62762c3815ffe4fdb0c5dbc0dd096b9703236010f4a17c255","9528dc401d1a2502393af70423c895c3df61ef62240c0dca429a7cd1bd535b82","eebf270ff516980678bf039e03e18a9461f196aee2825d4d65f7d8a1fa362bff","ee4e73f46ce2f6517e82434bd9fc63c8b6b2179d37d74525899f124a76d06669","b04de3a3cd10559130d898b36da5612fda5db2c31c95b502077cad9fe538ed6c","bc4c3476708a74ae09c06bcdbb9765baaa135592e1cf6e25f2ee9a942c6cd5ec","29e6e980f179ac2981d68954462dfd4a4545f73c021f6a4c8a5f442c0e16e56c","faa64d270fa523f80fd31bc7340ee7f6a21632c2ea0cea6535bf5a34bcc6adf7","cbd4ce7ee090549d836cbffac2e76a192ac5b1c5f15bcbe29c06d32dc7006f34","ea5a5d5873c239b97d846fb8c78437e08ffd731924764f746c0ebcb7731d7648","fb6b5b4592e0eca5b8dc2507432e621a18c16d488ae8a610e4d1ddba1edff667","df85ab12f80aced067959d43bd7744017fccb1eb95adcfa343f16cba7c9ef670","613df14d2c8c0ba78286705c4ed01ec701ed03189ca3803dd69bc7086b9c02ff","298f8d2584216932ea238927177ef343d0b8da735eb40a5ba96b1f92e3675e33","7251030d0662b66ffa03f1c75c81ea0e564c9f6c872b0658a25e64f35b68ce7a","c7aae030db999a44577cda213fc5d9b2cac4e55d8572ed5110fe6d187ba502c0","6f1302be2fa00d8a64e3bd48b4ccdf5d77a402441d7728d48c2ecee706c79127",{"version":"d2a28cf57b2f4f4ea437a33d30f7ba521b03687ff92f5a92d8276403412bfb35","signature":"a244408662b901d15567a5bcff4b29cd13a2a6c9bb2c27329eec616c48c8f144"},{"version":"669021522f8b7ee1635e549e5c1b1066469cef2e5f1ece9225c88899cf20519f","signature":"bbe47f7ebb177015803b69bad47ecf0e5987449cae5dd498664a9e4885d7cdff"},{"version":"050b16ddbb2cd747e802149fe10c9d9da40b1b04404f4927c31fb5292b5384f3","signature":"4f260a074507a0065f3cd71d1adc1b361f5337b3db9e8d01589d5872e9387a4a"},{"version":"912e0f9ae03a50910467b244840255ae4f3dbf14c4e9e5f1a11f34e2f0813d93","signature":"7674dcae15d29bcba5a7e8c26defdb06bf75297bfaa3025037bcc1e4df7b0ae1"},{"version":"ddf1d3a9dba85fdd42feaa4fa6b6a3d2c22daf37bb9520a78761127e95e9793b","signature":"97ff954e351fb81e182a8bc0d7c6e3625054e2c37ea5df0ad0ea12952bd5d9c0"},{"version":"0d46fedf399081064c3970b826786c6ef6b09c97b0ecbccc4c9180b02da64f38","signature":"c65ecf314f579465ceba2eb45ec7529f977a7809480ff6119c7c129022472cca"},{"version":"9312d63b368cbabfb1f9d8255355490a0ad4824b640fa28b99deecb0d709b326","signature":"efb30c7f5b1e7e2c8941c95355161907fdd6f3f28941cceacf81edc11db89bad"},{"version":"66b3464ea68bb0e5cd638c2ea8fa4a89953a342cf7b1ab9b618f0e66aa13a359","signature":"37700ef2907cfee5d680c1ceb83ba8355223f375c8093f523b9ee2ce108c1044"},{"version":"e6275adf9f2fb325f28ec71f71e31112e503d602980daedc372b5070c1746c32","signature":"cf4c01af6890db612fcb2eda144fa7a947a0fd005052f41485459d195cd7396d"},{"version":"f9da8a427635133164502df58eaf0abc87b0f03ae977776bed81abc3f0c8ba07","signature":"770c7abd7f2b17ff392e7179ad9b14518bc284f18834ec6efc00b4c62b8a4846"},{"version":"381b86cd0697910bcd46c0564477180b0019d15eac92970f9aaa725ad98aa19e","signature":"f29c840652a2d49e5b24debe0c06f9dd6ca15f96421cbac112ba982258b16a94"},{"version":"29cefefae7610a0b3eb629f4cb36c63e5dfc08060e681a6954f2a8cda414a8fe","signature":"44a3d19d7e208acb0261a1f718c047854d0794683a0d5c2193522d310e36bdec"},{"version":"75aa77d36e3cdb19a5ec42e0d24e14cfa80a9e143084de0adf7cf3874ed2d79a","signature":"090ce3b05198a4c287542354fcedbfd570d87b2f32d0363cab0eb48989aecd2e"},{"version":"7d89cfb3f2f4c172d5386b59a347aee432ea15274398028280f52d57f23ee9a6","signature":"ad4b4e5abb5f01f966304dfa08c347137a3fe77329c7ae6c17c824c3d4babf33"},{"version":"c97ea181cb9a8e091f2a7d09577d4b56f0b4e7819eae9774a398560e35f0310a","signature":"b78cb18aa49943470bbab837676a7c35d1dfbfae7241c144f1d7fbd183989022"},{"version":"c5b61981e99ef01ec27f761866bd4fbc5f7ddd04c8a68c58ddf8aa7f0cb9f690","signature":"024aeda8ac048f7b98839a2b806e2034fe2fa1db797418cf8923a06fb32358c8"},{"version":"bc3f26d5606e2ed986271c077b44383ddb7879735c03f185ec5cf63d27427bd0","signature":"54f9c37e150e434622cff5d71fb87237c48497141cb379fc1ab4d019a4a43e2e"},{"version":"e3a44bf7019bff50e986970d184956c39db6d76bf53f3a15f9d865628519444b","signature":"0d912ede0e33119759d7a3eee223fcbb83f1ca4c229719c62d54aa071487ceca"},{"version":"65609f443a42c62ae64a196e5c640a2899b8d8262066b41c770f88176ef51688","signature":"6f5878e8666a8abbb560dcc15b19c95ac5b0f4f85aabab2e804abb6a145030e4"},{"version":"8bb5917d432c9173ec36aa20613a1bb5d2de5893990cb653a4d6d167700cbb22","signature":"ad983b689f5e9c38442bce84deda9bf6936c3e5df6f022daeb7bffda83455a6f"},{"version":"7fe81f3bc35d898224d53484bf286351bb8e8d1114bd02f16e1a3d2951b94824","signature":"07d6a4c577cad80d9c1a2cf5d0e0ddae1aafadb264f5e41396999edd5963c94d"},{"version":"078702fcbdc302465d504856f684b8c78b55c21ed3d5b9d91e2b7810c8fdf96f","signature":"ac683a7d8aa2506a3d5a3243ed94348867c85307ba54e46e6dd4a440b6a3012d"},{"version":"10a01ca49ca259ee70179f16537668e2ccad748e93b70719adb4c3ed92da2346","signature":"cf08b5dd44744b109ed2ddb8968bc8cbd4c6192b74180e5fb0fb1671f38d5dbc"},{"version":"3f3a68621b1d031c48917a894c3aabf47cfa6d39cac7195578c9f3f94b108413","signature":"efa3706b88ec75d05bfa7fa44d39af58305b7affda1b3789cf6d3688bb83070b"},{"version":"cc993f997fbc3015d6a503bad6397b6a36d7c5a0d7f4c78bf322c067192c64f4","signature":"0a589d620f1d4719925c345e3c6e17dde3137765ea8db58c5a790f52ccdc58a6"},{"version":"dc0694bcc9ad8511c1c515b15a18aa026ed3df60199748cd2380917753d42d6b","signature":"8a3a12f093b91e0e3ca5f9909fb0cbaed59e2d864f04f103487f8f87095dfbfb"},{"version":"5f1640b549fb44022add2f088d2c659f9ed6001a5bb7dd22d862e3075f171189","signature":"ba23c12c72c1523b39716c37b20fddaaab05f3f82139c8cdc33d552c3de70684"}],"root":[[137,163]],"options":{"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":true,"exactOptionalPropertyTypes":true,"jsx":4,"jsxImportSource":"@lynx-js/react","module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":6,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[96,1],[87,2],[89,3],[93,4],[90,5],[91,6],[86,7],[88,8],[43,9],[81,10],[72,11],[58,12],[55,11],[79,13],[56,11],[77,14],[57,15],[82,16],[65,15],[60,11],[59,17],[74,15],[80,18],[78,15],[61,11],[69,15],[70,15],[62,17],[68,15],[63,15],[66,15],[67,11],[75,15],[64,11],[71,15],[73,15],[46,19],[53,20],[84,21],[54,22],[94,23],[44,19],[45,24],[50,25],[51,26],[49,27],[40,28],[95,29],[100,30],[99,31],[101,32],[106,33],[103,31],[105,34],[104,30],[115,35],[111,36],[114,37],[113,38],[119,39],[120,39],[118,40],[122,41],[121,40],[136,42],[124,43],[125,44],[126,45],[129,46],[131,47],[128,48],[130,49],[134,50],[135,51],[142,52],[144,53],[143,54],[137,55],[163,56],[150,57],[149,58],[146,59],[151,60],[162,61],[145,62],[148,63],[147,64],[152,65],[160,66],[159,67],[153,68],[154,69],[155,70],[156,71],[157,72],[161,73],[158,74],[138,70],[139,68],[140,68],[141,75]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type G9IdCase } from '../values/ids.js';
|
|
2
|
+
import type { G9Int64 } from '../values/int64.js';
|
|
3
|
+
import { type G9DateTimeWriteProfile, type G9LocalDateTime } from '../values/local-date-time.js';
|
|
4
|
+
import { type G9SqlValue } from '../values/sql-value.js';
|
|
5
|
+
/** Database-wide settings a codec reads while converting (fixed per `createG9Sqlite`). */
|
|
6
|
+
export interface G9CodecContext {
|
|
7
|
+
readonly idCase: G9IdCase;
|
|
8
|
+
readonly dateTimeProfile: G9DateTimeWriteProfile;
|
|
9
|
+
}
|
|
10
|
+
/** The codec context of a default database: lowercase GUIDs, the provider date-time profile. */
|
|
11
|
+
export declare const g9DefaultCodecContext: G9CodecContext;
|
|
12
|
+
/** SQLite storage class a codec declares in DDL (`CREATE TABLE` affinity). */
|
|
13
|
+
export type G9SqlType = 'TEXT' | 'INTEGER' | 'REAL' | 'BLOB' | 'NUMERIC';
|
|
14
|
+
/**
|
|
15
|
+
* Converts one column between the model value and the stored {@link G9SqlValue} (MAUI `IG9ValueConverter` plus the
|
|
16
|
+
* mapping sqlite-net did by reflection). Codecs never see NULL: the column decides nullability.
|
|
17
|
+
*/
|
|
18
|
+
export interface G9Codec<T> {
|
|
19
|
+
/** Stable name (`'text'`, `'int64'`, …) for diagnostics and descriptor checks. */
|
|
20
|
+
readonly kind: string;
|
|
21
|
+
readonly sqlType: G9SqlType;
|
|
22
|
+
/** Model → stored. Throws `misuse` for a value outside the codec's domain (never stores a wrong value). */
|
|
23
|
+
encode(value: T, context: G9CodecContext): G9SqlValue;
|
|
24
|
+
/** Stored → model. Throws `misuse` for a stored value the codec cannot represent exactly. */
|
|
25
|
+
decode(value: Exclude<G9SqlValue, null>, context: G9CodecContext): T;
|
|
26
|
+
}
|
|
27
|
+
/** TEXT. Reads numbers stored in a TEXT column (affinity drift) as their exact decimal text. */
|
|
28
|
+
export declare const textCodec: G9Codec<string>;
|
|
29
|
+
/** INTEGER within ±(2^53 − 1). Larger stored values fail loudly: declare the column `int64()`. */
|
|
30
|
+
export declare const intCodec: G9Codec<number>;
|
|
31
|
+
/** Signed 64-bit INTEGER, lossless: the model value is a {@link G9Int64} decimal string. */
|
|
32
|
+
export declare const int64Codec: G9Codec<G9Int64>;
|
|
33
|
+
/** REAL (double). */
|
|
34
|
+
export declare const realCodec: G9Codec<number>;
|
|
35
|
+
/**
|
|
36
|
+
* A decimal kept as exact text (`"12.3400"` keeps its scale). Declare the column TEXT: a NUMERIC/REAL affinity
|
|
37
|
+
* column converts the text to a double on store, which is exactly the loss this codec exists to avoid; such a value
|
|
38
|
+
* is read back as the double's shortest decimal text.
|
|
39
|
+
*/
|
|
40
|
+
export declare const decimalTextCodec: G9Codec<string>;
|
|
41
|
+
/** Boolean stored as 0/1. Any other stored value fails (a NULL is not false: make the column nullable). */
|
|
42
|
+
export declare const boolCodec: G9Codec<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* A GUID string: normalised to the canonical `D` form in the database's id case on write (and in predicates);
|
|
45
|
+
* read back exactly as stored. Non-GUID text passes through trimmed, as MAUI did.
|
|
46
|
+
*/
|
|
47
|
+
export declare const guidCodec: G9Codec<string>;
|
|
48
|
+
/** BLOB as `ArrayBuffer` (typed arrays are copied in). Empty ≠ NULL. */
|
|
49
|
+
export declare const blobCodec: G9Codec<ArrayBuffer>;
|
|
50
|
+
/** A MAUI-format TEXT date/time (both separators, 0–7 fraction digits) as {@link G9LocalDateTime}. */
|
|
51
|
+
export declare function legacyDateTimeCodec(profile?: G9DateTimeWriteProfile): G9Codec<G9LocalDateTime>;
|
|
52
|
+
/** Any JSON value stored as TEXT. */
|
|
53
|
+
export declare function jsonCodec<T>(): G9Codec<T>;
|
|
54
|
+
/**
|
|
55
|
+
* An enum stored as its integer (MAUI `NormalizeParam`: `Convert.ToInt32(enum)`). The model value is the name; an
|
|
56
|
+
* unknown stored number fails rather than inventing a member.
|
|
57
|
+
*/
|
|
58
|
+
export declare function enumIntCodec<K extends string>(members: Readonly<Record<K, number>>): G9Codec<K>;
|
|
59
|
+
/** An enum stored as its name (TEXT). */
|
|
60
|
+
export declare function enumTextCodec<K extends string>(members: readonly K[]): G9Codec<K>;
|
|
61
|
+
/** MAUI `IG9ValueConverter<TModel, TStore>`: model ↔ store, layered over a store codec. */
|
|
62
|
+
export interface G9ValueConverter<TModel, TStore> {
|
|
63
|
+
toStore(value: TModel): TStore;
|
|
64
|
+
fromStore(value: TStore): TModel;
|
|
65
|
+
}
|
|
66
|
+
/** Wraps a store codec with a {@link G9ValueConverter}. */
|
|
67
|
+
export declare function convertedCodec<TModel, TStore>(store: G9Codec<TStore>, converter: G9ValueConverter<TModel, TStore>, kind?: string): G9Codec<TModel>;
|
|
68
|
+
//# sourceMappingURL=codecs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codecs.d.ts","sourceRoot":"","sources":["../../src/codecs/codecs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAuB,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,UAAU,EAKhB,MAAM,qBAAqB,CAAC;AAE7B,0FAA0F;AAC1F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,sBAAsB,CAAC;CAClD;AAED,gGAAgG;AAChG,eAAO,MAAM,qBAAqB,EAAE,cAAgF,CAAC;AAErH,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAEzE;;;GAGG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,kFAAkF;IAClF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,2GAA2G;IAC3G,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,UAAU,CAAC;IACtD,6FAA6F;IAC7F,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,CAAC,CAAC;CACtE;AAMD,gGAAgG;AAChG,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,MAAM,CAapC,CAAC;AAEH,kGAAkG;AAClG,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,MAAM,CAYnC,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,OAAO,CAStC,CAAC;AAEH,qBAAqB;AACrB,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,MAAM,CAWpC,CAAC;AAIH;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAe3C,CAAC;AAEH,2GAA2G;AAC3G,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,OAAO,CAcrC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,MAAM,CAWpC,CAAC;AAEH,wEAAwE;AACxE,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,WAAW,CAYzC,CAAC;AAEH,sGAAsG;AACtG,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC,CAe9F;AAED,qCAAqC;AACrC,wBAAgB,SAAS,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAkBzC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAwB/F;AAED,yCAAyC;AACzC,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAcjF;AAED,2FAA2F;AAC3F,MAAM,WAAW,gBAAgB,CAAC,MAAM,EAAE,MAAM;IAC9C,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAC3C,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EACtB,SAAS,EAAE,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,IAAI,SAA4B,GAC/B,OAAO,CAAC,MAAM,CAAC,CAWjB"}
|