@voltro/sql-sqlite 0.86.0 → 0.87.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/CHANGELOG.md +5321 -0
- package/README.md +2 -0
- package/THIRD-PARTY-NOTICES.md +1 -225
- package/dist/index.d.ts +31 -2
- package/dist/sqlLayer.js +11 -9
- package/dist/store.js +76 -54
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -24,3 +24,5 @@ deliberately short so there is nothing here to drift out of date.
|
|
|
24
24
|
|
|
25
25
|
Proprietary. © 2026 Voltro UG. Your use is governed by the
|
|
26
26
|
[Terms of Service](https://voltro.cloud/legal/terms). See the bundled `LICENSE`.
|
|
27
|
+
|
|
28
|
+
Native SQLite busy waits are disabled: contention reaches the existing asynchronous transaction retry immediately, allowing a writer in the same process to finish. Standalone statements and WAL initialization may refuse contention; SQLite remains a single-writer database.
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -5,7 +5,7 @@ property of its respective copyright holders and is used under the terms of
|
|
|
5
5
|
its license. This file is provided for attribution; it grants no rights in
|
|
6
6
|
@voltro/sql-sqlite itself, which is proprietary (see LICENSE).
|
|
7
7
|
|
|
8
|
-
Generated from the resolved runtime dependency closure (
|
|
8
|
+
Generated from the resolved runtime dependency closure (2 packages).
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -37,214 +37,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
37
37
|
SOFTWARE.
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
## typeid-js@1.2.0
|
|
41
|
-
|
|
42
|
-
License: Apache-2.0
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
Apache License
|
|
46
|
-
Version 2.0, January 2004
|
|
47
|
-
http://www.apache.org/licenses/
|
|
48
|
-
|
|
49
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
50
|
-
|
|
51
|
-
1. Definitions.
|
|
52
|
-
|
|
53
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
54
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
55
|
-
|
|
56
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
57
|
-
the copyright owner that is granting the License.
|
|
58
|
-
|
|
59
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
60
|
-
other entities that control, are controlled by, or are under common
|
|
61
|
-
control with that entity. For the purposes of this definition,
|
|
62
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
63
|
-
direction or management of such entity, whether by contract or
|
|
64
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
65
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
66
|
-
|
|
67
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
68
|
-
exercising permissions granted by this License.
|
|
69
|
-
|
|
70
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
71
|
-
including but not limited to software source code, documentation
|
|
72
|
-
source, and configuration files.
|
|
73
|
-
|
|
74
|
-
"Object" form shall mean any form resulting from mechanical
|
|
75
|
-
transformation or translation of a Source form, including but
|
|
76
|
-
not limited to compiled object code, generated documentation,
|
|
77
|
-
and conversions to other media types.
|
|
78
|
-
|
|
79
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
80
|
-
Object form, made available under the License, as indicated by a
|
|
81
|
-
copyright notice that is included in or attached to the work
|
|
82
|
-
(an example is provided in the Appendix below).
|
|
83
|
-
|
|
84
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
85
|
-
form, that is based on (or derived from) the Work and for which the
|
|
86
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
87
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
88
|
-
of this License, Derivative Works shall not include works that remain
|
|
89
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
90
|
-
the Work and Derivative Works thereof.
|
|
91
|
-
|
|
92
|
-
"Contribution" shall mean any work of authorship, including
|
|
93
|
-
the original version of the Work and any modifications or additions
|
|
94
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
95
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
96
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
97
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
98
|
-
means any form of electronic, verbal, or written communication sent
|
|
99
|
-
to the Licensor or its representatives, including but not limited to
|
|
100
|
-
communication on electronic mailing lists, source code control systems,
|
|
101
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
102
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
103
|
-
excluding communication that is conspicuously marked or otherwise
|
|
104
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
105
|
-
|
|
106
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
107
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
108
|
-
subsequently incorporated within the Work.
|
|
109
|
-
|
|
110
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
111
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
112
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
113
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
114
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
115
|
-
Work and such Derivative Works in Source or Object form.
|
|
116
|
-
|
|
117
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
118
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
119
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
120
|
-
(except as stated in this section) patent license to make, have made,
|
|
121
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
122
|
-
where such license applies only to those patent claims licensable
|
|
123
|
-
by such Contributor that are necessarily infringed by their
|
|
124
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
125
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
126
|
-
institute patent litigation against any entity (including a
|
|
127
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
128
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
129
|
-
or contributory patent infringement, then any patent licenses
|
|
130
|
-
granted to You under this License for that Work shall terminate
|
|
131
|
-
as of the date such litigation is filed.
|
|
132
|
-
|
|
133
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
134
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
135
|
-
modifications, and in Source or Object form, provided that You
|
|
136
|
-
meet the following conditions:
|
|
137
|
-
|
|
138
|
-
(a) You must give any other recipients of the Work or
|
|
139
|
-
Derivative Works a copy of this License; and
|
|
140
|
-
|
|
141
|
-
(b) You must cause any modified files to carry prominent notices
|
|
142
|
-
stating that You changed the files; and
|
|
143
|
-
|
|
144
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
145
|
-
that You distribute, all copyright, patent, trademark, and
|
|
146
|
-
attribution notices from the Source form of the Work,
|
|
147
|
-
excluding those notices that do not pertain to any part of
|
|
148
|
-
the Derivative Works; and
|
|
149
|
-
|
|
150
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
151
|
-
distribution, then any Derivative Works that You distribute must
|
|
152
|
-
include a readable copy of the attribution notices contained
|
|
153
|
-
within such NOTICE file, excluding those notices that do not
|
|
154
|
-
pertain to any part of the Derivative Works, in at least one
|
|
155
|
-
of the following places: within a NOTICE text file distributed
|
|
156
|
-
as part of the Derivative Works; within the Source form or
|
|
157
|
-
documentation, if provided along with the Derivative Works; or,
|
|
158
|
-
within a display generated by the Derivative Works, if and
|
|
159
|
-
wherever such third-party notices normally appear. The contents
|
|
160
|
-
of the NOTICE file are for informational purposes only and
|
|
161
|
-
do not modify the License. You may add Your own attribution
|
|
162
|
-
notices within Derivative Works that You distribute, alongside
|
|
163
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
164
|
-
that such additional attribution notices cannot be construed
|
|
165
|
-
as modifying the License.
|
|
166
|
-
|
|
167
|
-
You may add Your own copyright statement to Your modifications and
|
|
168
|
-
may provide additional or different license terms and conditions
|
|
169
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
170
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
171
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
172
|
-
the conditions stated in this License.
|
|
173
|
-
|
|
174
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
175
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
176
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
177
|
-
this License, without any additional terms or conditions.
|
|
178
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
179
|
-
the terms of any separate license agreement you may have executed
|
|
180
|
-
with Licensor regarding such Contributions.
|
|
181
|
-
|
|
182
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
183
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
184
|
-
except as required for reasonable and customary use in describing the
|
|
185
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
186
|
-
|
|
187
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
188
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
189
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
190
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
191
|
-
implied, including, without limitation, any warranties or conditions
|
|
192
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
193
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
194
|
-
appropriateness of using or redistributing the Work and assume any
|
|
195
|
-
risks associated with Your exercise of permissions under this License.
|
|
196
|
-
|
|
197
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
198
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
199
|
-
unless required by applicable law (such as deliberate and grossly
|
|
200
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
201
|
-
liable to You for damages, including any direct, indirect, special,
|
|
202
|
-
incidental, or consequential damages of any character arising as a
|
|
203
|
-
result of this License or out of the use or inability to use the
|
|
204
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
205
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
206
|
-
other commercial damages or losses), even if such Contributor
|
|
207
|
-
has been advised of the possibility of such damages.
|
|
208
|
-
|
|
209
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
210
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
211
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
212
|
-
or other liability obligations and/or rights consistent with this
|
|
213
|
-
License. However, in accepting such obligations, You may act only
|
|
214
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
215
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
216
|
-
defend, and hold each Contributor harmless for any liability
|
|
217
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
218
|
-
of your accepting any such warranty or additional liability.
|
|
219
|
-
|
|
220
|
-
END OF TERMS AND CONDITIONS
|
|
221
|
-
|
|
222
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
223
|
-
|
|
224
|
-
To apply the Apache License to your work, attach the following
|
|
225
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
226
|
-
replaced with your own identifying information. (Don't include
|
|
227
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
228
|
-
comment syntax for the file format. We also recommend that a
|
|
229
|
-
file or class name and description of purpose be included on the
|
|
230
|
-
same "printed page" as the copyright notice for easier
|
|
231
|
-
identification within third-party archives.
|
|
232
|
-
|
|
233
|
-
Copyright [yyyy] [name of copyright owner]
|
|
234
|
-
|
|
235
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
236
|
-
you may not use this file except in compliance with the License.
|
|
237
|
-
You may obtain a copy of the License at
|
|
238
|
-
|
|
239
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
240
|
-
|
|
241
|
-
Unless required by applicable law or agreed to in writing, software
|
|
242
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
243
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
244
|
-
See the License for the specific language governing permissions and
|
|
245
|
-
limitations under the License.
|
|
246
|
-
```
|
|
247
|
-
|
|
248
40
|
## ulid@3.0.2
|
|
249
41
|
|
|
250
42
|
License: MIT
|
|
@@ -273,19 +65,3 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
273
65
|
SOFTWARE.
|
|
274
66
|
```
|
|
275
67
|
|
|
276
|
-
## uuid@11.1.1
|
|
277
|
-
|
|
278
|
-
License: MIT
|
|
279
|
-
|
|
280
|
-
```
|
|
281
|
-
The MIT License (MIT)
|
|
282
|
-
|
|
283
|
-
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
|
284
|
-
|
|
285
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
286
|
-
|
|
287
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
288
|
-
|
|
289
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
290
|
-
```
|
|
291
|
-
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { DataStore } from '@voltro/database';
|
|
|
7
7
|
import { Effect } from 'effect';
|
|
8
8
|
import { EventEmitter } from 'node:events';
|
|
9
9
|
import { InsertIgnoreResult } from '@voltro/database';
|
|
10
|
+
import { InsertManyOptions } from '@voltro/database';
|
|
10
11
|
import { Layer } from 'effect';
|
|
11
12
|
import { ManagedRuntime } from 'effect';
|
|
12
13
|
import { Predicate } from '@voltro/database';
|
|
@@ -124,11 +125,39 @@ export declare class SqliteStore implements DataStore {
|
|
|
124
125
|
private executeUpsert;
|
|
125
126
|
private executeInsertIgnore;
|
|
126
127
|
private findByConflict;
|
|
128
|
+
integrityQuery(descriptor: QueryDescriptor): Promise<ReadonlyArray<Row>>;
|
|
127
129
|
query(descriptor: QueryDescriptor): Promise<ReadonlyArray<Row>>;
|
|
128
130
|
raw<T extends object = Row>(fragment: RawSqlFragment, _opts?: {
|
|
129
131
|
dependsOn?: ReadonlyArray<string>;
|
|
130
132
|
}): Promise<ReadonlyArray<T>>;
|
|
131
|
-
|
|
133
|
+
/**
|
|
134
|
+
* Run a raw fragment on a specific transaction's connection, or on the
|
|
135
|
+
* pool when `txn` is null. The transactional view a mutation's `ctx.store`
|
|
136
|
+
* IS routes its `raw` here with its own connection — so a raw statement
|
|
137
|
+
* inside a transaction (a `SELECT … FOR UPDATE`, a lock, a statement the
|
|
138
|
+
* builders cannot express) joins that transaction rather than running
|
|
139
|
+
* beside it on a pooled connection. Until it did, `ctx.store.raw` simply
|
|
140
|
+
* did not exist inside a mutation, while the docs said it exists on every
|
|
141
|
+
* SQL store.
|
|
142
|
+
*
|
|
143
|
+
* Rebinds the captured fragment onto the live `sql`: static text splices
|
|
144
|
+
* verbatim, values bind as parameters — a value containing `'; DROP TABLE`
|
|
145
|
+
* round-trips as data. `dependsOn` (from opts or the fragment) is recorded
|
|
146
|
+
* by the reactive layer at the call site; raw execution itself is untracked.
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
/**
|
|
150
|
+
* SQLite has no row locks, so `lock: 'update'` compiles to a plain SELECT.
|
|
151
|
+
* One connection serialises its writers anyway, but Turso's `BEGIN
|
|
152
|
+
* CONCURRENT` (and a second connection on the same file) let two
|
|
153
|
+
* transactions read the same "locked" rows and both act on that snapshot.
|
|
154
|
+
* Rewriting the matched rows in place first puts them in this transaction's
|
|
155
|
+
* write set, so a competing locker conflicts and retries instead of passing
|
|
156
|
+
* the same count-then-write check.
|
|
157
|
+
*/
|
|
158
|
+
private lockRowsOn;
|
|
159
|
+
/* Excluded from this release type: queryOn */
|
|
160
|
+
rawOn<T extends object = Row>(fragment: RawSqlFragment, txn: TxnContext | null): Promise<ReadonlyArray<T>>;
|
|
132
161
|
private runWithEager;
|
|
133
162
|
getInternalRunWithEager(): (d: QueryDescriptor, txn: TxnContext | null) => Promise<ReadonlyArray<Row>>;
|
|
134
163
|
/**
|
|
@@ -155,7 +184,7 @@ export declare class SqliteStore implements DataStore {
|
|
|
155
184
|
*/
|
|
156
185
|
private writeWithRecorders;
|
|
157
186
|
insert(table: string, row: Row): Promise<Row>;
|
|
158
|
-
insertMany(table: string, rows: ReadonlyArray<Row
|
|
187
|
+
insertMany(table: string, rows: ReadonlyArray<Row>, options?: InsertManyOptions): Promise<ReadonlyArray<Row>>;
|
|
159
188
|
patchJson(table: string, primaryKey: RowKey, path: string, value: unknown, additionalPatch?: Readonly<Record<string, unknown>>): Promise<Row | null>;
|
|
160
189
|
update(table: string, primaryKey: RowKey, patch: Readonly<Record<string, unknown>>): Promise<Row | null>;
|
|
161
190
|
delete(table: string, primaryKey: RowKey): Promise<boolean>;
|
package/dist/sqlLayer.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { SqliteClient as e } from "@effect/sql-sqlite-node";
|
|
2
|
-
import { Config as t, Context as n,
|
|
3
|
-
import { SHARED_TRANSACTION_SERVICE as
|
|
2
|
+
import { Config as t, Context as n, Duration as r, Layer as i } from "effect";
|
|
3
|
+
import { SHARED_TRANSACTION_SERVICE as a } from "@voltro/database";
|
|
4
4
|
//#region src/sqlLayer.ts
|
|
5
|
-
var
|
|
6
|
-
transactionService: t.succeed(
|
|
7
|
-
filename: t.succeed(
|
|
5
|
+
var o = r.seconds(2), s = (s) => e.layerConfig({
|
|
6
|
+
transactionService: t.succeed(a),
|
|
7
|
+
filename: t.succeed(s.filename),
|
|
8
8
|
prepareCacheSize: t.succeed(0),
|
|
9
9
|
transactionMode: t.succeed("deferred"),
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
busyTimeout: t.succeed(r.zero),
|
|
11
|
+
...s.readonly === void 0 ? {} : { readonly: t.succeed(s.readonly) },
|
|
12
|
+
prepareCacheTTL: t.succeed(o)
|
|
13
|
+
}).pipe(i.tap((t) => n.get(t, e.SqliteClient)`PRAGMA foreign_keys = ON`)), c = (e) => {
|
|
12
14
|
if (e.url) {
|
|
13
15
|
if (e.url === ":memory:") return { filename: ":memory:" };
|
|
14
16
|
if (e.url.startsWith("file:")) return { filename: e.url.slice(5) };
|
|
@@ -16,6 +18,6 @@ var a = (a) => e.layerConfig({
|
|
|
16
18
|
}
|
|
17
19
|
if (e.database) return { filename: e.database };
|
|
18
20
|
throw Error("@voltro/sql-sqlite: no filename supplied. Set DB_URL=file:./db.sqlite or DB_DATABASE=path/to/db.sqlite.");
|
|
19
|
-
},
|
|
21
|
+
}, l = (e) => s(c(e));
|
|
20
22
|
//#endregion
|
|
21
|
-
export { e as SqliteClient,
|
|
23
|
+
export { o as PREPARE_CACHE_TTL, e as SqliteClient, c as connectionFromConfig, s as makeSqliteSqlLayer, l as makeSqliteSqlLayerFromConfig };
|
package/dist/store.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { isRetryableSqliteFailure as e } from "./retry.js";
|
|
2
2
|
import { Effect as t, Layer as n, ManagedRuntime as r, Option as i } from "effect";
|
|
3
|
-
import { EagerCardinalityError as a, attachEagerLoads as o, attributionFields as s, bulkInsertLimitsFor as c, chunkRowsForInsert as l, coercePredicateForSqlite as u, compileEagerJson as d, compileJsonPatch as f, compilePredicate as p, compileRawFragment as m, compileRowProjection as h, compileSelect as g, decodeRowsFromSchema as _, emitCommittedChanges as v, encodeRowForSchema as y, externalChangeEvent as b, hasEagerLoads as x, isTableReactive as S, jsonPatchAssignments as C, makeEagerFallbackReporter as w, makeTransactionAbortTracker as T, observeDbOp as E, onTransaction as D, qualifyTable as O, quoteIdent as k, raiseChangeListenerCeiling as A, recordsTable as j, requireTable as M, rowKeyColumns as N, runSavepoint as P, runStoreTransaction as F, runWriteRecorders as I, stampGeneratedId as L, stampGeneratedIds as R, upsertUpdatePatch as z, upsertUpdateValues as B, withCapturedAttribution as V } from "@voltro/database";
|
|
4
|
-
import { EventEmitter as
|
|
5
|
-
import { createLogger as
|
|
6
|
-
import { SqlClient as
|
|
3
|
+
import { EagerCardinalityError as a, attachEagerLoads as o, attributionFields as s, bulkInsertLimitsFor as c, chunkRowsForInsert as l, coercePredicateForSqlite as u, compileEagerJson as d, compileJsonPatch as f, compilePredicate as p, compileRawFragment as m, compileRowProjection as h, compileSelect as g, decodeRowsFromSchema as _, emitCommittedChanges as v, encodeRowForSchema as y, externalChangeEvent as b, hasEagerLoads as x, isTableReactive as S, jsonPatchAssignments as C, makeEagerFallbackReporter as w, makeTransactionAbortTracker as T, observeDbOp as E, onTransaction as D, qualifyTable as O, quoteIdent as k, raiseChangeListenerCeiling as A, recordsTable as j, requireTable as M, rowKeyColumns as N, runSavepoint as P, runStoreTransaction as F, runWriteRecorders as I, stampGeneratedId as L, stampGeneratedIds as R, upsertUpdatePatch as z, upsertUpdateValues as B, withCapturedAttribution as V, writeImagesObserved as H } from "@voltro/database";
|
|
4
|
+
import { EventEmitter as U } from "node:events";
|
|
5
|
+
import { createLogger as W } from "@voltro/logger";
|
|
6
|
+
import { SqlClient as G } from "effect/sql/SqlClient";
|
|
7
7
|
//#region src/store.ts
|
|
8
|
-
var
|
|
8
|
+
var K = W({ scope: "voltro:sqlite" }), q = async (t) => {
|
|
9
9
|
let i = t.tracerLayer ? n.mergeAll(t.sqlLayer, t.tracerLayer) : t.sqlLayer, a = r.make(i);
|
|
10
|
-
return new
|
|
11
|
-
},
|
|
10
|
+
return new Q(await a.runPromise(G), a, null, void 0, t.isRetryable ?? e, t.systemName ?? "sqlite", t.wrapTransaction, t.fullText ?? "fts5");
|
|
11
|
+
}, J = (e) => e, Y = (e) => u(e), X = (e) => e.predicate === void 0 || e.predicate === null ? e : {
|
|
12
12
|
...e,
|
|
13
|
-
predicate:
|
|
14
|
-
},
|
|
13
|
+
predicate: Y(e.predicate)
|
|
14
|
+
}, Z = (e, t) => {
|
|
15
15
|
let n = y(e, t, [
|
|
16
16
|
"json",
|
|
17
17
|
"array",
|
|
@@ -19,7 +19,7 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
19
19
|
]), r = {};
|
|
20
20
|
for (let [e, t] of Object.entries(n)) r[e] = t instanceof Date ? t.toISOString() : typeof t == "boolean" ? +!!t : t;
|
|
21
21
|
return r;
|
|
22
|
-
},
|
|
22
|
+
}, Q = class n {
|
|
23
23
|
sql;
|
|
24
24
|
runtime;
|
|
25
25
|
namespace;
|
|
@@ -30,8 +30,8 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
30
30
|
emitter;
|
|
31
31
|
inflightTxns = 0;
|
|
32
32
|
reportEagerFallback;
|
|
33
|
-
constructor(t, n, r = null, i, a = e, o = "sqlite", s =
|
|
34
|
-
this.sql = t, this.runtime = n, this.namespace = r, this.isRetryable = a, this.systemName = o, this.wrapTransaction = s, this.fullText = c, this.emitter = i ?? new
|
|
33
|
+
constructor(t, n, r = null, i, a = e, o = "sqlite", s = J, c = "fts5") {
|
|
34
|
+
this.sql = t, this.runtime = n, this.namespace = r, this.isRetryable = a, this.systemName = o, this.wrapTransaction = s, this.fullText = c, this.emitter = i ?? new U(), A(this.emitter), this.reportEagerFallback = w(K);
|
|
35
35
|
}
|
|
36
36
|
withNamespace(e) {
|
|
37
37
|
return e === this.namespace ? this : new n(this.sql, this.runtime, e, this.emitter, this.isRetryable, this.systemName, this.wrapTransaction, this.fullText);
|
|
@@ -53,16 +53,16 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
53
53
|
await this.runtime.runPromise(n`ATTACH DATABASE ${r} AS ${n(e)}`);
|
|
54
54
|
}
|
|
55
55
|
async executeQuery(e, n, r) {
|
|
56
|
-
let i = g(
|
|
56
|
+
let i = g(X(this.withFullTextMode(e)), this.sql, this.namespace), a = n ? t.provideService(i, this.sql.transactionService, n) : i, o = await E(this.systemName, "select", () => this.runtime.runPromise(a));
|
|
57
57
|
return _(o, e.table, "sqlite", e);
|
|
58
58
|
}
|
|
59
59
|
keyWhere(e, t) {
|
|
60
|
-
let n = this.sql, r =
|
|
60
|
+
let n = this.sql, r = Z(Object.fromEntries(N(t)), e);
|
|
61
61
|
return n.and(Object.entries(r).map(([e, t]) => n`${n(e)} = ${t}`));
|
|
62
62
|
}
|
|
63
63
|
async executeInsert(e, n, r, i, a) {
|
|
64
64
|
n = L(e, n);
|
|
65
|
-
let o = this.sql, s = o`INSERT INTO ${o(this.nsT(e))} ${o.insert(
|
|
65
|
+
let o = this.sql, s = o`INSERT INTO ${o(this.nsT(e))} ${o.insert(Z(n, e))} RETURNING ${h(e, o)}`, c = r ? t.provideService(s, this.sql.transactionService, r) : s, l = await this.runtime.runPromise(c), u = _(l, e, "sqlite")[0];
|
|
66
66
|
if (!u) throw Error(`SqliteStore.insert: no row returned for table '${e}'`);
|
|
67
67
|
return await this.routeEvent({
|
|
68
68
|
table: e,
|
|
@@ -72,7 +72,7 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
72
72
|
}, i, r, a), u;
|
|
73
73
|
}
|
|
74
74
|
async executeUpdate(e, n, r, i, a, o) {
|
|
75
|
-
let s = this.sql, c = s`UPDATE ${s(this.nsT(e))} SET ${s.update(
|
|
75
|
+
let s = this.sql, c = s`UPDATE ${s(this.nsT(e))} SET ${s.update(Z(r, e))} WHERE ${this.keyWhere(e, n)} RETURNING ${h(e, s)}`, l = i ? t.provideService(c, this.sql.transactionService, i) : c, u = await this.runtime.runPromise(l), d = _(u, e, "sqlite")[0];
|
|
76
76
|
return d ? (await this.routeEvent({
|
|
77
77
|
table: e,
|
|
78
78
|
op: "update",
|
|
@@ -80,28 +80,29 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
80
80
|
new: d
|
|
81
81
|
}, a, i, o), d) : null;
|
|
82
82
|
}
|
|
83
|
-
async executeInsertMany(e, n, r, i, a) {
|
|
83
|
+
async executeInsertMany(e, n, r, i, a, o) {
|
|
84
84
|
if (n = R(e, n), n.length === 0) return [];
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
87
|
-
let e =
|
|
88
|
-
|
|
85
|
+
let s = this.sql, u = o?.returning === "none", d = u && !H(e), f = n.map((t) => Z(t, e)), p = l(f, c("sqlite")), m = (t) => d ? s`INSERT INTO ${s(this.nsT(e))} ${s.insert(t)}` : s`INSERT INTO ${s(this.nsT(e))} ${s.insert(t)} RETURNING ${h(e, s)}`, g;
|
|
86
|
+
if (p.length === 1) {
|
|
87
|
+
let e = m(p[0]), n = r ? t.provideService(e, this.sql.transactionService, r) : e;
|
|
88
|
+
g = await this.runtime.runPromise(n);
|
|
89
89
|
} else if (r) {
|
|
90
90
|
let e = [];
|
|
91
|
-
for (let n of
|
|
92
|
-
|
|
93
|
-
} else
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
for (let n of p) e.push(...await this.runtime.runPromise(t.provideService(m(n), this.sql.transactionService, r)));
|
|
92
|
+
g = e;
|
|
93
|
+
} else g = await this.runtime.runPromise(s.withTransaction(t.map(t.forEach(p, m, { concurrency: 1 }), (e) => e.flat())));
|
|
94
|
+
if (d) return [];
|
|
95
|
+
let v = _(g, e, "sqlite");
|
|
96
|
+
for (let t of v) await this.routeEvent({
|
|
96
97
|
table: e,
|
|
97
98
|
op: "insert",
|
|
98
99
|
old: null,
|
|
99
100
|
new: t
|
|
100
101
|
}, i, r, a);
|
|
101
|
-
return
|
|
102
|
+
return u ? [] : v;
|
|
102
103
|
}
|
|
103
104
|
async executePatchJson(e, n, r, i, a, o, s, c) {
|
|
104
|
-
let l = this.sql, u =
|
|
105
|
+
let l = this.sql, u = Z(C(n, r, c), e), d = l.csv([f(l, "sqlite", r, i, l`${l(this.nsT(e))}.${l(r.split(".")[0])}`), ...Object.entries(u).map(([e, t]) => l`${l(e)} = ${t}`)]), p = l`UPDATE ${l(this.nsT(e))} SET ${d} WHERE ${this.keyWhere(e, n)} RETURNING ${h(e, l)}`, m = a ? t.provideService(p, this.sql.transactionService, a) : p, g = await this.runtime.runPromise(m), v = _(g, e, "sqlite")[0];
|
|
105
106
|
return v ? (await this.routeEvent({
|
|
106
107
|
table: e,
|
|
107
108
|
op: "update",
|
|
@@ -119,7 +120,7 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
119
120
|
}, i, r, a), !0) : !1;
|
|
120
121
|
}
|
|
121
122
|
async appendInTxn(e, n, r) {
|
|
122
|
-
let i = this.sql, a = i`INSERT INTO ${i(this.nsT(e))} ${i.insert(
|
|
123
|
+
let i = this.sql, a = i`INSERT INTO ${i(this.nsT(e))} ${i.insert(Z(n, e))}`;
|
|
123
124
|
await this.runtime.runPromise(r ? t.provideService(a, this.sql.transactionService, r) : a);
|
|
124
125
|
}
|
|
125
126
|
async maxInTxn(e, n, r, i) {
|
|
@@ -152,7 +153,7 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
152
153
|
}
|
|
153
154
|
return this.executeInsert(e, n, i, a, o);
|
|
154
155
|
}
|
|
155
|
-
let c = this.sql, l = r.conflictColumns.map((e) => c`${c(e)}`), u = Object.keys(n).filter((e) => n[e] !== void 0), d = r.update === void 0 ? u.filter((e) => e !== "id" && !r.conflictColumns.includes(e)) : r.update, f =
|
|
156
|
+
let c = this.sql, l = r.conflictColumns.map((e) => c`${c(e)}`), u = Object.keys(n).filter((e) => n[e] !== void 0), d = r.update === void 0 ? u.filter((e) => e !== "id" && !r.conflictColumns.includes(e)) : r.update, f = Z(s, e), p = [...d.filter((e) => !Object.hasOwn(s, e)).map((e) => c`${c(e)} = excluded.${c(e)}`), ...Object.entries(f).map(([e, t]) => c`${c(e)} = ${t}`)], m = p.length > 0 ? c.csv(p) : c`${c(r.conflictColumns[0])} = excluded.${c(r.conflictColumns[0])}`, g = c`INSERT INTO ${c(this.nsT(e))} ${c.insert(Z(n, e))} ON CONFLICT (${c.csv(l)}) DO UPDATE SET ${m} RETURNING ${h(e, c)}`, v = i ? t.provideService(g, this.sql.transactionService, i) : g, y = await this.runtime.runPromise(v), b = _(y, e, "sqlite")[0];
|
|
156
157
|
if (!b) throw Error(`SqliteStore.upsert: no row returned for table '${e}'`);
|
|
157
158
|
let x = n.id !== void 0 && n.id === b.id ? "insert" : "update";
|
|
158
159
|
return await this.routeEvent({
|
|
@@ -164,7 +165,7 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
164
165
|
}
|
|
165
166
|
async executeInsertIgnore(e, n, r, i, a, o) {
|
|
166
167
|
n = L(e, n);
|
|
167
|
-
let s = this.sql, c = r.conflictColumns.map((e) => s`${s(e)}`), l = s`INSERT INTO ${s(this.nsT(e))} ${s.insert(
|
|
168
|
+
let s = this.sql, c = r.conflictColumns.map((e) => s`${s(e)}`), l = s`INSERT INTO ${s(this.nsT(e))} ${s.insert(Z(n, e))} ON CONFLICT (${s.csv(c)}) DO NOTHING RETURNING ${h(e, s)}`, u = i ? t.provideService(l, this.sql.transactionService, i) : l, d = await this.runtime.runPromise(u), f = _(d, e, "sqlite")[0];
|
|
168
169
|
if (f) return await this.routeEvent({
|
|
169
170
|
table: e,
|
|
170
171
|
op: "insert",
|
|
@@ -183,15 +184,26 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
183
184
|
}
|
|
184
185
|
async findByConflict(e, n, r, i) {
|
|
185
186
|
if (r.length === 0) return;
|
|
186
|
-
let a = this.sql, o =
|
|
187
|
+
let a = this.sql, o = Z(Object.fromEntries(r.map((e) => [e, n[e]])), e), s = r.map((e) => a`${a(e)} = ${o[e]}`), c = a`SELECT ${h(e, a)} FROM ${a(this.nsT(e))} WHERE ${a.and(s)} LIMIT 1`, l = i ? t.provideService(c, this.sql.transactionService, i) : c, u = await this.runtime.runPromise(l);
|
|
187
188
|
return _(u, e, "sqlite")[0];
|
|
188
189
|
}
|
|
190
|
+
integrityQuery(e) {
|
|
191
|
+
return this.query(e);
|
|
192
|
+
}
|
|
189
193
|
query(e) {
|
|
190
194
|
return this.runWithEager(e, null);
|
|
191
195
|
}
|
|
192
196
|
raw(e, t) {
|
|
193
197
|
return this.rawOn(e, null);
|
|
194
198
|
}
|
|
199
|
+
async lockRowsOn(e, n) {
|
|
200
|
+
if (e.lock !== "update" || e.alias !== void 0 || e.joins?.length) return;
|
|
201
|
+
let r = this.sql, i = e.predicate ? r` WHERE ${p(Y(e.predicate), r, this.namespace, e.table)}` : r``, a = r`UPDATE ${r(this.nsT(e.table))} SET rowid = rowid${i}`;
|
|
202
|
+
await E(this.systemName, "update", () => this.runtime.runPromise(t.provideService(a, this.sql.transactionService, n)));
|
|
203
|
+
}
|
|
204
|
+
async queryOn(e, t) {
|
|
205
|
+
return await this.lockRowsOn(e, t), this.runWithEager(e, t);
|
|
206
|
+
}
|
|
195
207
|
rawOn(e, n) {
|
|
196
208
|
let r = m(e, this.sql), i = n ? t.provideService(r, this.sql.transactionService, n) : r;
|
|
197
209
|
return E(this.systemName, "raw", () => this.runtime.runPromise(i));
|
|
@@ -236,8 +248,8 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
236
248
|
insert(e, t) {
|
|
237
249
|
return this.localWrite("insert", e, (n, r, i) => this.executeInsert(e, t, r, i, n));
|
|
238
250
|
}
|
|
239
|
-
insertMany(e, t) {
|
|
240
|
-
return this.localWrite("insert", e, (
|
|
251
|
+
insertMany(e, t, n) {
|
|
252
|
+
return this.localWrite("insert", e, (r, i, a) => this.executeInsertMany(e, t, i, a, r, n));
|
|
241
253
|
}
|
|
242
254
|
patchJson(e, t, n, r, i) {
|
|
243
255
|
return this.localWrite("update", e, (a, o, s) => this.executePatchJson(e, t, n, r, o, s, a, i));
|
|
@@ -255,24 +267,26 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
255
267
|
return this.executeDeleteMany(e, t, null, null);
|
|
256
268
|
}
|
|
257
269
|
async executeUpdateMany(e, n, r, i, a, o) {
|
|
258
|
-
let s = this.sql, c = p(
|
|
259
|
-
|
|
270
|
+
let s = this.sql, c = p(Y(r.where), s, this.namespace, e), l = H(e), u = l ? h(e, s) : s.literal("1"), d = s`UPDATE ${s(this.nsT(e))} SET ${s.update(Z(n, e))} WHERE ${c} RETURNING ${u}`, f = i ? t.provideService(d, this.sql.transactionService, i) : d, m = await E(this.systemName, "update", () => this.runtime.runPromise(f));
|
|
271
|
+
if (!l) return m.length;
|
|
272
|
+
for (let t of _(m, e, "sqlite")) await this.routeEvent({
|
|
260
273
|
table: e,
|
|
261
274
|
op: "update",
|
|
262
275
|
old: null,
|
|
263
276
|
new: t
|
|
264
277
|
}, a, i, o);
|
|
265
|
-
return
|
|
278
|
+
return m.length;
|
|
266
279
|
}
|
|
267
280
|
async executeDeleteMany(e, n, r, i, a) {
|
|
268
|
-
let o = this.sql, s = p(
|
|
269
|
-
|
|
281
|
+
let o = this.sql, s = p(Y(n.where), o, this.namespace, e), c = H(e), l = c ? h(e, o) : o.literal("1"), u = o`DELETE FROM ${o(this.nsT(e))} WHERE ${s} RETURNING ${l}`, d = r ? t.provideService(u, this.sql.transactionService, r) : u, f = await E(this.systemName, "delete", () => this.runtime.runPromise(d));
|
|
282
|
+
if (!c) return f.length;
|
|
283
|
+
for (let t of _(f, e, "sqlite")) await this.routeEvent({
|
|
270
284
|
table: e,
|
|
271
285
|
op: "delete",
|
|
272
286
|
old: t,
|
|
273
287
|
new: null
|
|
274
288
|
}, i, r, a);
|
|
275
|
-
return
|
|
289
|
+
return f.length;
|
|
276
290
|
}
|
|
277
291
|
upsert(e, t, n) {
|
|
278
292
|
return this.localWrite("upsert", e, (r, i, a) => this.executeUpsert(e, t, n, i, a, r));
|
|
@@ -347,7 +361,7 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
347
361
|
return await F({
|
|
348
362
|
...this.txnSpec("SqliteStore.transactional"),
|
|
349
363
|
work: e,
|
|
350
|
-
makeView: (e, t) => new
|
|
364
|
+
makeView: (e, t) => new $(this, e, t)
|
|
351
365
|
});
|
|
352
366
|
} finally {
|
|
353
367
|
this.inflightTxns--;
|
|
@@ -389,7 +403,7 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
389
403
|
if (this.inflightTxns > 0) {
|
|
390
404
|
let t = Date.now() + e;
|
|
391
405
|
for (; this.inflightTxns > 0 && Date.now() < t;) await new Promise((e) => setTimeout(e, 25));
|
|
392
|
-
this.inflightTxns > 0 &&
|
|
406
|
+
this.inflightTxns > 0 && K.warn("close: grace period expired with in-flight transactions", {
|
|
393
407
|
gracePeriodMs: e,
|
|
394
408
|
inflight: this.inflightTxns
|
|
395
409
|
});
|
|
@@ -399,7 +413,7 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
399
413
|
async ping() {
|
|
400
414
|
await this.runtime.runPromise(this.sql`SELECT 1`);
|
|
401
415
|
}
|
|
402
|
-
},
|
|
416
|
+
}, $ = class {
|
|
403
417
|
parent;
|
|
404
418
|
txn;
|
|
405
419
|
attr;
|
|
@@ -409,13 +423,18 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
409
423
|
constructor(e, t, n = void 0) {
|
|
410
424
|
this.parent = e, this.txn = t, this.attr = n;
|
|
411
425
|
}
|
|
412
|
-
savepoint(e) {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
426
|
+
async savepoint(e) {
|
|
427
|
+
let n = this.events.length;
|
|
428
|
+
try {
|
|
429
|
+
return await P({
|
|
430
|
+
tracker: this.aborts,
|
|
431
|
+
name: `voltro_sp_${++this.savepointCounter}`,
|
|
432
|
+
spelling: "standard",
|
|
433
|
+
exec: (e) => this.parent.run(t.provideService(G.pipe(t.flatMap((t) => t.unsafe(e))), this.parent.transactionService, this.txn))
|
|
434
|
+
}, e);
|
|
435
|
+
} catch (e) {
|
|
436
|
+
throw this.events.length = n, e;
|
|
437
|
+
}
|
|
419
438
|
}
|
|
420
439
|
savepointCounter = 0;
|
|
421
440
|
run(e) {
|
|
@@ -427,8 +446,11 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
427
446
|
raw(e, t) {
|
|
428
447
|
return this.aborts.track(() => this.parent.rawOn(e, this.txn));
|
|
429
448
|
}
|
|
449
|
+
integrityQuery(e) {
|
|
450
|
+
return this.query(e);
|
|
451
|
+
}
|
|
430
452
|
query(e) {
|
|
431
|
-
return this.aborts.track(() => this.parent.
|
|
453
|
+
return this.aborts.track(() => this.parent.queryOn(e, this.txn));
|
|
432
454
|
}
|
|
433
455
|
emptyTables(e) {
|
|
434
456
|
return this.aborts.track(() => this.parent.emptyTablesOn(e, this.txn));
|
|
@@ -436,8 +458,8 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
436
458
|
insert(e, t) {
|
|
437
459
|
return this.aborts.track(() => this.parent.getInternalExecuteInsert()(e, t, this.txn, this.events, this.attr));
|
|
438
460
|
}
|
|
439
|
-
insertMany(e, t) {
|
|
440
|
-
return this.aborts.track(() => this.parent.getInternalExecuteInsertMany()(e, t, this.txn, this.events, this.attr));
|
|
461
|
+
insertMany(e, t, n) {
|
|
462
|
+
return this.aborts.track(() => this.parent.getInternalExecuteInsertMany()(e, t, this.txn, this.events, this.attr, n));
|
|
441
463
|
}
|
|
442
464
|
patchJson(e, t, n, r, i) {
|
|
443
465
|
return this.aborts.track(() => this.parent.getInternalExecutePatchJson()(e, t, n, r, this.txn, this.events, this.attr, i));
|
|
@@ -477,4 +499,4 @@ var G = U({ scope: "voltro:sqlite" }), K = async (t) => {
|
|
|
477
499
|
}
|
|
478
500
|
};
|
|
479
501
|
//#endregion
|
|
480
|
-
export {
|
|
502
|
+
export { Q as SqliteStore, q as makeSqliteStore };
|