@voltro/database 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/THIRD-PARTY-NOTICES.md +1 -225
- package/dist/dataTransfers.js +2 -1
- package/dist/fieldEncryption.js +64 -41
- package/dist/frameworkTables.js +15 -2
- package/dist/idGenerator.js +4 -4
- package/dist/index.d.ts +148 -15
- package/dist/index.js +77 -76
- package/dist/migrate.js +51 -31
- package/dist/migrations/applier.js +399 -384
- package/dist/migrations/ddlStatements.js +9 -0
- package/dist/migrations/fileDiscovery.js +145 -131
- package/dist/migrations/introspect.js +186 -184
- package/dist/migrations/planner.js +24 -14
- package/dist/migrations/postgresEnumCheck.js +4 -1
- package/dist/migrations/sqliteCatalogName.js +13 -0
- package/dist/predicate.js +27 -20
- package/dist/queryBuilder.js +6 -0
- package/dist/rowDecoder.js +61 -11
- package/dist/sql.d.ts +2746 -3748
- package/dist/sql.js +15 -14
- package/dist/sqlCompiler.js +88 -71
- package/dist/sqlMutation.js +55 -0
- package/dist/transactionOutcome.js +4 -1
- package/dist/typeId.js +51 -0
- package/dist/typedStore.js +1 -1
- package/dist/writeRecorder.js +21 -20
- package/package.json +2 -3
package/dist/index.d.ts
CHANGED
|
@@ -293,7 +293,8 @@ export declare const AUTO_FILLED_COLUMNS: readonly ["id", "tenantId", "createdAt
|
|
|
293
293
|
|
|
294
294
|
declare type AutoFilledColumn = (typeof AUTO_FILLED_COLUMNS)[number];
|
|
295
295
|
|
|
296
|
-
|
|
296
|
+
/** `AVG(column)` — always a `number` (a mean is not exact), `null` over no rows. */
|
|
297
|
+
export declare const avg: (column: string, alias?: string) => AggregateColumn<number | null>;
|
|
297
298
|
|
|
298
299
|
export declare const avgOver: (column: string, alias?: string) => WindowBuilder;
|
|
299
300
|
|
|
@@ -905,6 +906,24 @@ export declare const changeUpdate: (table: string, before: Row, after: Row, meta
|
|
|
905
906
|
*/
|
|
906
907
|
export declare const chunkRowsForInsert: <T extends Record<string, unknown>>(rows: ReadonlyArray<T>, limits: BulkInsertLimits | undefined) => ReadonlyArray<ReadonlyArray<T>>;
|
|
907
908
|
|
|
909
|
+
/**
|
|
910
|
+
* The id of the key a ciphertext names, read off the value without any key —
|
|
911
|
+
* what lets a status count values per key instead of decrypting each one.
|
|
912
|
+
*
|
|
913
|
+
* The id is the LAST `:`-separated part of the envelope
|
|
914
|
+
* (`enc:v2:<r|c>:<iv>:<tag>:<ct>:<kid>`, `enc:v1:<iv>:<tag>:<ct>:<kid>`), after
|
|
915
|
+
* everything a release without key ids reads. That placement is deliberate:
|
|
916
|
+
* such a release takes the first parts and ignores the rest, so during a
|
|
917
|
+
* rolling deploy, and after a rollback, it still reads what the keyring wrote.
|
|
918
|
+
* The id is a lookup hint, not an authenticated field: a value whose id was
|
|
919
|
+
* altered still has to pass GCM under some key of the keyring, and a reader
|
|
920
|
+
* that verifies (the retire gate) decrypts rather than trusts it.
|
|
921
|
+
*
|
|
922
|
+
* `undefined` for a value written before ids, and for anything that is not a
|
|
923
|
+
* ciphertext.
|
|
924
|
+
*/
|
|
925
|
+
export declare const ciphertextKeyId: (value: unknown) => string | undefined;
|
|
926
|
+
|
|
908
927
|
/**
|
|
909
928
|
* Claim the attribution for an echo, or `undefined` if this write did not
|
|
910
929
|
* originate here.
|
|
@@ -2562,6 +2581,14 @@ export declare interface DataStore {
|
|
|
2562
2581
|
* up, on `FluentStore.query`, which is what handlers actually call.
|
|
2563
2582
|
*/
|
|
2564
2583
|
query(descriptor: QueryDescriptor): Promise<ReadonlyArray<Row>>;
|
|
2584
|
+
/** Server-internal constraint/integrity read on this exact store view.
|
|
2585
|
+
* Bypasses request row visibility only; preserves tenant, deletion/expiry
|
|
2586
|
+
* scopes, codecs, physical namespace and in-flight transaction writes.
|
|
2587
|
+
* Never use its rows as an application response or mutation authorization.
|
|
2588
|
+
* Optional for custom stores: a consumer requiring complete coverage must
|
|
2589
|
+
* refuse when absent, never fall back to an ordinary filtered query.
|
|
2590
|
+
*/
|
|
2591
|
+
integrityQuery?(descriptor: QueryDescriptor): Promise<ReadonlyArray<Row>>;
|
|
2565
2592
|
/** Insert a row. Emits an insert ChangeEvent (deferred if inside `transactional()`). */
|
|
2566
2593
|
insert(table: string, row: Row): Promise<Row>;
|
|
2567
2594
|
/**
|
|
@@ -2581,8 +2608,14 @@ export declare interface DataStore {
|
|
|
2581
2608
|
* - memory store: loop + per-row emit
|
|
2582
2609
|
*
|
|
2583
2610
|
* An empty `rows` array is a no-op that returns `[]` (no statement, no events).
|
|
2611
|
+
*
|
|
2612
|
+
* `{ returning: 'none' }` is for a caller that does not read the result: it
|
|
2613
|
+
* resolves to `[]`. The rows are written, and their change events emitted,
|
|
2614
|
+
* exactly as without it; the store reads the inserted rows back only when
|
|
2615
|
+
* change events or an in-transaction recorder need them
|
|
2616
|
+
* (`writeImagesObserved`). A wrapper store forwards `options` unchanged.
|
|
2584
2617
|
*/
|
|
2585
|
-
insertMany(table: string, rows: ReadonlyArray<Row
|
|
2618
|
+
insertMany(table: string, rows: ReadonlyArray<Row>, options?: InsertManyOptions): Promise<ReadonlyArray<Row>>;
|
|
2586
2619
|
/**
|
|
2587
2620
|
* In-place JSON merge: set `value` at `path` inside the JSON column
|
|
2588
2621
|
* (`path` is the column name, optionally with a nested dot-path, e.g.
|
|
@@ -2978,12 +3011,13 @@ export declare interface DataStore {
|
|
|
2978
3011
|
* not. Without a savepoint the two are incompatible, so `--atomic` simply
|
|
2979
3012
|
* could not import such a bundle on those engines.
|
|
2980
3013
|
*
|
|
2981
|
-
*
|
|
2982
|
-
*
|
|
2983
|
-
*
|
|
2984
|
-
*
|
|
2985
|
-
*
|
|
2986
|
-
*
|
|
3014
|
+
* Every shipped memory and SQL TRANSACTIONAL view implements it. Besides
|
|
3015
|
+
* statement-abort recovery, it isolates a compound operation whose typed
|
|
3016
|
+
* application error may be handled inside the outer transaction. Rollback
|
|
3017
|
+
* discards that operation's buffered committed-change events as well as rows;
|
|
3018
|
+
* earlier events and successful nesting remain intact. Root stores have no
|
|
3019
|
+
* savepoint. Custom stores may omit it; operations requiring local atomicity
|
|
3020
|
+
* must refuse rather than run without protection.
|
|
2987
3021
|
*
|
|
2988
3022
|
* Failures propagate: the savepoint is rolled back and the error rethrown, so
|
|
2989
3023
|
* the caller's own error handling is unchanged.
|
|
@@ -3192,6 +3226,9 @@ export declare interface DbOpSample {
|
|
|
3192
3226
|
*/
|
|
3193
3227
|
export declare const decimal: (precision: number, scale?: number) => ColumnBuilder<string, "decimal">;
|
|
3194
3228
|
|
|
3229
|
+
/** Equality key for exact fixed-point decimal strings; null for invalid input. */
|
|
3230
|
+
export declare const decimalEqualityKey: (value: unknown) => string | null;
|
|
3231
|
+
|
|
3195
3232
|
/**
|
|
3196
3233
|
* Declare that an enum value was renamed. Place this NEXT TO the
|
|
3197
3234
|
* `dbEnum(...)` declaration whose value array now carries the new label:
|
|
@@ -3276,6 +3313,12 @@ export declare const decodeRowsForTable: <T extends Record<string, unknown>>(row
|
|
|
3276
3313
|
*/
|
|
3277
3314
|
export declare const decodeRowsFromSchema: <T extends Record<string, unknown>>(rows: ReadonlyArray<T>, tableName: string, dialect: DecoderDialectId, query?: QueryDescriptor) => ReadonlyArray<T>;
|
|
3278
3315
|
|
|
3316
|
+
/**
|
|
3317
|
+
* Decode the rows of a SELECT: by the query's aggregations when it has them,
|
|
3318
|
+
* by the table's columns otherwise. Every dialect store's read path calls this.
|
|
3319
|
+
*/
|
|
3320
|
+
export declare const decodeSelectRows: <T extends Record<string, unknown>>(rows: ReadonlyArray<T>, query: QueryDescriptor, dialect: DecoderDialectId) => ReadonlyArray<T>;
|
|
3321
|
+
|
|
3279
3322
|
/**
|
|
3280
3323
|
* Decrypt every `.encrypted()` column's value on read. A value that
|
|
3281
3324
|
* isn't a framework ciphertext (legacy plaintext, `null`) passes
|
|
@@ -3816,6 +3859,9 @@ export declare const encodeFieldValue: (cipher: FieldCipher, value: unknown, bin
|
|
|
3816
3859
|
*/
|
|
3817
3860
|
export declare const encodeRowForSchema: <T extends Record<string, unknown>>(row: T, tableName: string, types?: ReadonlyArray<ColumnType>) => T;
|
|
3818
3861
|
|
|
3862
|
+
/** 16 bytes → the 26-character lowercase Crockford-base32 suffix of the spec. */
|
|
3863
|
+
export declare const encodeTypeIdSuffix: (src: Uint8Array) => string;
|
|
3864
|
+
|
|
3819
3865
|
/** The UNBOUND envelope: `enc:v1:<iv>:<tag>:<ct>`. */
|
|
3820
3866
|
export declare const ENCRYPTED_PREFIX = "enc:v1:";
|
|
3821
3867
|
|
|
@@ -3975,6 +4021,13 @@ export declare interface FallbackLogger {
|
|
|
3975
4021
|
readonly debug: (message: string, fields?: Record<string, unknown>) => void;
|
|
3976
4022
|
}
|
|
3977
4023
|
|
|
4024
|
+
/**
|
|
4025
|
+
* A key id: a short slug, so it can ride inside every envelope. Explicit ids
|
|
4026
|
+
* are chosen by the operator (`VOLTRO_FIELD_ENCRYPTION_KEYS`); derived ids are
|
|
4027
|
+
* `k` + 10 hex characters of a fingerprint that is not the key.
|
|
4028
|
+
*/
|
|
4029
|
+
export declare const FIELD_KEY_ID_PATTERN: RegExp;
|
|
4030
|
+
|
|
3978
4031
|
/**
|
|
3979
4032
|
* Where a ciphertext BELONGS — the table, the column and, when the row's
|
|
3980
4033
|
* identity is known at write time, the row. Fed to AES-GCM as additional
|
|
@@ -4008,6 +4061,16 @@ export declare interface FieldBinding {
|
|
|
4008
4061
|
* its string form and a read of the numeric column agree. */
|
|
4009
4062
|
export declare const fieldBinding: (table: string, column: string, rowId?: unknown) => FieldBinding;
|
|
4010
4063
|
|
|
4064
|
+
/**
|
|
4065
|
+
* Every address a column's values may have been sealed under: its own, and the
|
|
4066
|
+
* names a DECLARED rename says it had — `table('new').renamedFrom('old')`, a
|
|
4067
|
+
* column's `.renamedFrom('old')`. A rename is catalog-only, so the rows keep the
|
|
4068
|
+
* bytes bound to the old name; without this every value of a renamed column
|
|
4069
|
+
* stopped opening. Only declared names are added: a value moved anywhere else
|
|
4070
|
+
* still refuses. The own address comes first — a re-key seals under it.
|
|
4071
|
+
*/
|
|
4072
|
+
export declare const fieldBindingsOf: (table: TableLike, column: string, rowId?: unknown) => ReadonlyArray<FieldBinding>;
|
|
4073
|
+
|
|
4011
4074
|
/** The cipher the store middleware injects. Operates on opaque strings. */
|
|
4012
4075
|
export declare interface FieldCipher {
|
|
4013
4076
|
/**
|
|
@@ -4030,6 +4093,15 @@ export declare interface FieldCipher {
|
|
|
4030
4093
|
* a cipher with one key.
|
|
4031
4094
|
*/
|
|
4032
4095
|
readonly sealedWithPreviousKey?: (ciphertext: string, binding?: FieldBinding) => boolean;
|
|
4096
|
+
/** The id of the key new values are sealed under — a keyring's active key. */
|
|
4097
|
+
readonly activeKeyId?: string;
|
|
4098
|
+
/**
|
|
4099
|
+
* The id of the key that opens this value: the one the value names when that
|
|
4100
|
+
* key opens it, otherwise the key of the keyring that does (a value written
|
|
4101
|
+
* before ciphertexts carried an id). `undefined` when no key of the keyring
|
|
4102
|
+
* opens it.
|
|
4103
|
+
*/
|
|
4104
|
+
readonly keyIdOf?: (ciphertext: string, binding?: FieldBinding) => string | undefined;
|
|
4033
4105
|
}
|
|
4034
4106
|
|
|
4035
4107
|
/**
|
|
@@ -4714,6 +4786,17 @@ export declare const insertIgnoreRowOutcome: <T extends AnyTable>(store: TypedIn
|
|
|
4714
4786
|
readonly outcome: "inserted" | "ignored";
|
|
4715
4787
|
}>;
|
|
4716
4788
|
|
|
4789
|
+
/** Options of {@link DataStore.insertMany}. */
|
|
4790
|
+
export declare interface InsertManyOptions {
|
|
4791
|
+
/**
|
|
4792
|
+
* `'rows'` (the default) resolves to the inserted rows as stored. `'none'`
|
|
4793
|
+
* resolves to `[]`, so a store need not send the rows back: a bulk insert
|
|
4794
|
+
* into a table no change event or recorder observes then costs one
|
|
4795
|
+
* statement per chunk and no result rows.
|
|
4796
|
+
*/
|
|
4797
|
+
readonly returning?: 'rows' | 'none';
|
|
4798
|
+
}
|
|
4799
|
+
|
|
4717
4800
|
/**
|
|
4718
4801
|
* Insert MANY rows, typed against the table — `insertRow`'s batch, and nothing
|
|
4719
4802
|
* else: it forwards to `store.insertMany` unchanged, so the chunking, the
|
|
@@ -4734,8 +4817,9 @@ export declare const insertIgnoreRowOutcome: <T extends AnyTable>(store: TypedIn
|
|
|
4734
4817
|
*
|
|
4735
4818
|
* An empty array is a legal no-op, so a caller does not have to guard the call
|
|
4736
4819
|
* — `store.insertMany` decides what that means, and it means "insert nothing".
|
|
4820
|
+
* `{ returning: 'none' }` is forwarded as well: it resolves to `[]`.
|
|
4737
4821
|
*/
|
|
4738
|
-
export declare const insertManyRows: <T extends AnyTable>(store: TypedInsertManyStore, table: T, rows: ReadonlyArray<InferInsertRow<T
|
|
4822
|
+
export declare const insertManyRows: <T extends AnyTable>(store: TypedInsertManyStore, table: T, rows: ReadonlyArray<InferInsertRow<T>>, options?: InsertManyOptions) => Promise<ReadonlyArray<InferRow<T>>>;
|
|
4739
4823
|
|
|
4740
4824
|
/**
|
|
4741
4825
|
* Insert a row, typed against the table: the payload must carry every required
|
|
@@ -6181,6 +6265,10 @@ Joins extends JoinsMap = {}> {
|
|
|
6181
6265
|
* on sqlite (its writers are serialised already).
|
|
6182
6266
|
*/
|
|
6183
6267
|
forUpdate: () => Query<RowOf, IxNames, Joins>;
|
|
6268
|
+
/** Hold a shared SQL row lock until transaction end; concurrent readers may
|
|
6269
|
+
* proceed. SQLite-family stores retain their transaction isolation without
|
|
6270
|
+
* row-lock SQL, and memory retains optimistic validation. */
|
|
6271
|
+
forShare: () => Query<RowOf, IxNames, Joins>;
|
|
6184
6272
|
/**
|
|
6185
6273
|
* Cross-tenant: opt OUT of the runtime's automatic
|
|
6186
6274
|
* `tenantId = <subject.tenantId>` scope on `tenant()` tables. Use for
|
|
@@ -6561,13 +6649,14 @@ export declare interface QueryDescriptor<R = Row> {
|
|
|
6561
6649
|
readonly includeExpired?: boolean;
|
|
6562
6650
|
/**
|
|
6563
6651
|
* Lock the matched rows for the rest of the enclosing transaction — set by
|
|
6564
|
-
* `.forUpdate()
|
|
6565
|
-
*
|
|
6652
|
+
* `.forUpdate()` for exclusive intent, `.forShare()` for concurrent readers
|
|
6653
|
+
* that must fence writers. SQL dialects retain the lock until transaction end;
|
|
6654
|
+
* sqlite serialises writers already and
|
|
6566
6655
|
* emits nothing. Outside a transaction the lock is released as the statement
|
|
6567
6656
|
* ends, which is harmless and useless — the point is a read-modify-write
|
|
6568
6657
|
* whose read and write share one transaction.
|
|
6569
6658
|
*/
|
|
6570
|
-
readonly lock?: 'update';
|
|
6659
|
+
readonly lock?: 'update' | 'share';
|
|
6571
6660
|
/**
|
|
6572
6661
|
* Opt OUT of the runtime's automatic tenant scope on `tenant()` tables.
|
|
6573
6662
|
* Set by `.unscoped()`. Honored by the runtime, same as `includeDeleted`.
|
|
@@ -7063,6 +7152,15 @@ export declare interface ReferenceOptions {
|
|
|
7063
7152
|
readonly column?: string;
|
|
7064
7153
|
}
|
|
7065
7154
|
|
|
7155
|
+
/**
|
|
7156
|
+
* Refuse an UPDATE that changes the id of a row with `.encrypted()` columns.
|
|
7157
|
+
* Each sealed value is bound to its row's id: an update that moved the row to a
|
|
7158
|
+
* new id left every sealed value in it bound to the old one, reported success,
|
|
7159
|
+
* and from then on every read of the row failed. Move such a row by writing it
|
|
7160
|
+
* under the new id (insert, then delete the old one) — the store seals it there.
|
|
7161
|
+
*/
|
|
7162
|
+
export declare const refuseIdChangeOfSealedRow: (patch: Row, table: TableLike | undefined, rowId: unknown) => void;
|
|
7163
|
+
|
|
7066
7164
|
/**
|
|
7067
7165
|
* Build the error a dialect store throws when the framework refuses a write.
|
|
7068
7166
|
*
|
|
@@ -7286,7 +7384,10 @@ export declare const resolveActorSnapshot: (store: ActorLookupStore, subjectId:
|
|
|
7286
7384
|
export declare type ResolveAggregateResult<A, RowOf, Joins extends JoinsMap> = A extends {
|
|
7287
7385
|
readonly op: 'min' | 'max';
|
|
7288
7386
|
readonly column: infer C extends string;
|
|
7289
|
-
} ? ResolveJoinedSource<C, RowOf, Joins> | null : A extends
|
|
7387
|
+
} ? ResolveJoinedSource<C, RowOf, Joins> | null : A extends {
|
|
7388
|
+
readonly op: 'sum';
|
|
7389
|
+
readonly column: infer C extends string;
|
|
7390
|
+
} ? [NonNullable<ResolveJoinedSource<C, RowOf, Joins>>] extends [string] ? string | null : number | null : A extends AggregateColumn<infer T> ? T : never;
|
|
7290
7391
|
|
|
7291
7392
|
/**
|
|
7292
7393
|
* Pick the branch mechanism. Prioritises the Neon copy-on-write fast-path when
|
|
@@ -8385,7 +8486,13 @@ export declare interface SubqueryInPredicate {
|
|
|
8385
8486
|
*/
|
|
8386
8487
|
export declare type SubqueryResults = Map< QueryDescriptor, Set<unknown> | number>;
|
|
8387
8488
|
|
|
8388
|
-
|
|
8489
|
+
/** `SUM(column)` — a `number` over `integer()` / `real()`, the exact decimal
|
|
8490
|
+
* STRING over `decimal()` / `bigint()` (the column's own type), `null` over no
|
|
8491
|
+
* rows. On a typed query the result type follows the column. */
|
|
8492
|
+
export declare const sum: <C extends string>(column: C, alias?: string) => AggregateColumn<number | null> & {
|
|
8493
|
+
readonly op: "sum";
|
|
8494
|
+
readonly column: C;
|
|
8495
|
+
};
|
|
8389
8496
|
|
|
8390
8497
|
export declare const sumOver: (column: string, alias?: string) => WindowBuilder;
|
|
8391
8498
|
|
|
@@ -9277,7 +9384,7 @@ export declare interface TypedInsertIgnoreOutcomeStore {
|
|
|
9277
9384
|
|
|
9278
9385
|
/** The minimal store surface `insertManyRows` needs. */
|
|
9279
9386
|
export declare interface TypedInsertManyStore {
|
|
9280
|
-
readonly insertMany: (table: string, rows: ReadonlyArray<Row
|
|
9387
|
+
readonly insertMany: (table: string, rows: ReadonlyArray<Row>, options?: InsertManyOptions) => Promise<ReadonlyArray<Row>>;
|
|
9281
9388
|
}
|
|
9282
9389
|
|
|
9283
9390
|
/** The minimal store surface `insertRow` needs — satisfied by `ctx.store`. */
|
|
@@ -9305,6 +9412,14 @@ export declare interface TypedUpsertStore {
|
|
|
9305
9412
|
readonly upsert: (table: string, row: Row, options: UpsertOptions) => Promise<Row>;
|
|
9306
9413
|
}
|
|
9307
9414
|
|
|
9415
|
+
/**
|
|
9416
|
+
* A fresh TypeID for `prefix`: `user_01h455vb4pex5vsknk084sn02q`. This is what
|
|
9417
|
+
* the `typeid` id scheme writes on insert; call it yourself when a row's id
|
|
9418
|
+
* has to exist before the insert (a self-referencing `createdBy`, a child row
|
|
9419
|
+
* written in the same flow).
|
|
9420
|
+
*/
|
|
9421
|
+
export declare const typeId: (prefix: string) => string;
|
|
9422
|
+
|
|
9308
9423
|
/**
|
|
9309
9424
|
* `(SELECT ...) UNION (SELECT ...) ...` — dedup-merge. Q6.
|
|
9310
9425
|
*
|
|
@@ -9460,6 +9575,9 @@ export declare const upsertUpdatePatch: (row: Row, existing: Row, options: Upser
|
|
|
9460
9575
|
/** Shared driver lowering: omit undefined values and refuse identity rewrites. */
|
|
9461
9576
|
export declare const upsertUpdateValues: (options: UpsertOptions) => Record<string, unknown>;
|
|
9462
9577
|
|
|
9578
|
+
/** The 16 bytes of a fresh UUIDv7 (RFC 9562), monotonic within this process. */
|
|
9579
|
+
export declare const uuidV7Bytes: (now?: number) => Uint8Array;
|
|
9580
|
+
|
|
9463
9581
|
/**
|
|
9464
9582
|
* Validate one column-name key on a table's fields map. Throws on
|
|
9465
9583
|
* empty / invalid characters / > 63 bytes. Records a WARN above 50.
|
|
@@ -9706,6 +9824,9 @@ export declare const VOLTRO_LOCAL_FIRST_MIXIN_ID: "voltro/localFirst";
|
|
|
9706
9824
|
*/
|
|
9707
9825
|
export declare const _voltroApiKeysTable: SchemaTable;
|
|
9708
9826
|
|
|
9827
|
+
/** Finalized role-observation history survives graceful replica shutdown. */
|
|
9828
|
+
export declare const _voltroApiRoleWorkloadBucketsTable: SchemaTable;
|
|
9829
|
+
|
|
9709
9830
|
export declare const _voltroCdcOffsetsTable: TableLike;
|
|
9710
9831
|
|
|
9711
9832
|
/**
|
|
@@ -10001,6 +10122,18 @@ export declare interface WriteAttribution {
|
|
|
10001
10122
|
readonly via?: 'agent';
|
|
10002
10123
|
}
|
|
10003
10124
|
|
|
10125
|
+
/**
|
|
10126
|
+
* Does anything read the row images of a write to `table`? A set-based write
|
|
10127
|
+
* (`updateMany` / `deleteMany`) answers with a count; the stores fetch its rows
|
|
10128
|
+
* back — `RETURNING *`, `OUTPUT`, a SELECT first — only to hand them to change
|
|
10129
|
+
* events and in-transaction recorders. A `.nonReactive()` table that no
|
|
10130
|
+
* recorder watches has neither, and the rows then crossed the wire for nobody:
|
|
10131
|
+
* every retired aggregate generation, `rowData` included, on every refresh.
|
|
10132
|
+
*
|
|
10133
|
+
* Asked per statement, not cached: recorders register and suspend at runtime.
|
|
10134
|
+
*/
|
|
10135
|
+
export declare const writeImagesObserved: (table: string) => boolean;
|
|
10136
|
+
|
|
10004
10137
|
export declare type WriteRecorder = (port: TxnRecorderPort, write: RecordedWrite) => Promise<void>;
|
|
10005
10138
|
|
|
10006
10139
|
/** Are recorders suspended right here? Exported so a caller can SAY so. */
|
package/dist/index.js
CHANGED
|
@@ -2,81 +2,82 @@ import { ColumnBuilder as e, SELF_REFERENCE_TARGET as t, array as n, bigint as r
|
|
|
2
2
|
import { pluginRef as P, pluginRefSpecOf as F } from "./pluginRef.js";
|
|
3
3
|
import { columnRef as I, isColumnReference as L } from "./columnReference.js";
|
|
4
4
|
import { authoredError as R, authoredMessageOf as z, causeBranches as B, classifyConstraintViolation as V, describeCharsetRefusal as H, describeDriverError as U, describeRowBindings as W, extractDbCause as G, isForeignKeyViolation as K, isQueryTimeout as q, wireSafeCause as J } from "./dbCause.js";
|
|
5
|
-
import { compareDecimal as Y } from "./decimalComparison.js";
|
|
6
|
-
import { MATCHES_NO_ROWS as
|
|
7
|
-
import { resolveActorSnapshot as
|
|
8
|
-
import { allEnumRenames as
|
|
9
|
-
import { deserializeArraysOnRead as
|
|
10
|
-
import { BOUND_ENCRYPTED_PREFIX as
|
|
11
|
-
import { refuseWrite as
|
|
12
|
-
import { MAX_IDENTIFIER_LENGTH as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
5
|
+
import { compareDecimal as Y, decimalEqualityKey as X } from "./decimalComparison.js";
|
|
6
|
+
import { MATCHES_NO_ROWS as Z, and as Q, arrayContains as $, arrayHas as ee, arrayOverlaps as te, collectSubqueries as ne, contains as re, eq as ie, evaluatePredicate as ae, exists as oe, gt as se, gte as ce, inSet as le, inSubquery as ue, isNotNull as de, isNull as fe, jsonField as pe, lt as me, lte as he, neq as ge, not as _e, notExists as ve, notInSet as ye, notInSubquery as be, or as xe, preparePredicate as Se, spatialPredicate as Ce, startsWith as we, walkLeaves as Te } from "./predicate.js";
|
|
7
|
+
import { resolveActorSnapshot as Ee } from "./actorSnapshot.js";
|
|
8
|
+
import { allEnumRenames as De, clearEnumRenames as Oe, declareEnumRename as ke, getEnumRenames as Ae } from "./enumRenames.js";
|
|
9
|
+
import { deserializeArraysOnRead as je, serializeArraysForWrite as Me } from "./arrayCodec.js";
|
|
10
|
+
import { BOUND_ENCRYPTED_PREFIX as Ne, ENCRYPTED_PREFIX as Pe, FIELD_KEY_ID_PATTERN as Fe, FieldDecryptionError as Ie, ciphertextKeyId as Le, decodeFieldValue as Re, decryptFieldsOnRead as ze, encodeFieldValue as Be, encryptFieldsForWrite as Ve, encryptFieldsForWriteBatch as He, encryptedColumnsOf as Ue, fieldBinding as We, fieldBindingsOf as Ge, isBoundCiphertext as Ke, isEncrypted as qe, isFieldDecryptionError as Je, isRawEncoding as Ye, refuseIdChangeOfSealedRow as Xe } from "./fieldEncryption.js";
|
|
11
|
+
import { refuseWrite as Ze, storeRefusalOf as Qe } from "./storeRefusal.js";
|
|
12
|
+
import { MAX_IDENTIFIER_LENGTH as $e, WARN_IDENTIFIER_LENGTH as et, drainIdentifierWarnings as tt, validateColumnName as nt, validateIndexName as rt, validateTableName as it, validateTypeIdPrefix as at } from "./identifierLimits.js";
|
|
13
|
+
import { encodeTypeIdSuffix as ot, typeId as st, uuidV7Bytes as ct } from "./typeId.js";
|
|
14
|
+
import { generateSnowflake as lt, resetSnowflake as ut } from "./snowflake.js";
|
|
15
|
+
import { deriveTypeIdPrefix as dt, generateId as ft, resolveIdScheme as pt } from "./idGenerator.js";
|
|
16
|
+
import { defineMixin as mt, mixin as ht, resolveMixinGraph as gt } from "./mixins.js";
|
|
17
|
+
import { AUTO_FILLED_COLUMNS as _t, jsonIndex as vt, table as yt, vectorDistanceToOpclass as bt } from "./table.js";
|
|
18
|
+
import { DEFAULT_ACQUIRE_TIMEOUT_MS as xt, isMysqlFamily as St, isSqliteFamily as Ct, quoteIdent as wt } from "./dialect.js";
|
|
19
|
+
import { allRegisteredTables as Tt, clearTableRegistry as Et, ensureTableRegistered as Dt, getTable as Ot, isTableReactive as kt, registerTable as At, requireTable as jt, unregisterTable as Mt } from "./tableRegistry.js";
|
|
20
|
+
import { avg as Nt, avgOver as Pt, column as Ft, count as It, countDistinct as Lt, databaseHandle as Rt, denseRank as zt, except as Bt, intersect as Vt, lag as Ht, lead as Ut, max as Wt, min as Gt, orderClausesOf as Kt, paginateBy as qt, paginateById as Jt, queryFor as Yt, rank as Xt, resolveFullTextIndex as Zt, rowNumber as Qt, sum as $t, sumOver as en, union as tn, unionAll as nn } from "./queryBuilder.js";
|
|
21
|
+
import { isView as rn, queryForView as an, view as on, viewSql as sn } from "./view.js";
|
|
22
|
+
import { INITIAL_VERSION as cn, VersionConflict as ln, planVersionedUpdate as un, settleVersionedUpdate as dn, versionColumnOf as fn } from "./optimisticVersion.js";
|
|
23
|
+
import { timestampMs as pn, timestampMsOrNull as mn } from "./wire.js";
|
|
24
|
+
import { columnSchema as hn, rowSchema as gn } from "./rowSchema.js";
|
|
25
|
+
import { inferForeignKey as _n, isEmptyRelationsSpec as vn, isRelationsSpec as yn, many as bn, manyToMany as xn, one as Sn, relations as Cn, validateRelationConfig as wn } from "./relations.js";
|
|
26
|
+
import { allRegisteredRelations as Tn, clearRelationsRegistry as En, getRelation as Dn, getRelations as On, registerDiscoveredRelations as kn, registerRelations as An, validateRegisteredRelations as jn } from "./relationsRegistry.js";
|
|
27
|
+
import { DEFAULT_SUBJECT_GRAPH_DEPTH as Mn, deriveSubjectGraph as Nn, formatSubjectGraph as Pn } from "./subjectGraph.js";
|
|
28
|
+
import { decodeRowsForTable as Fn, decodeRowsFromSchema as In, decodeSelectRows as Ln, encodeRowForSchema as Rn } from "./rowDecoder.js";
|
|
29
|
+
import { upsertUpdatePatch as zn, upsertUpdateValues as Bn } from "./upsertUpdate.js";
|
|
30
|
+
import { isCompositeRowKey as Vn, rowKeyColumns as Hn, rowKeyIdentity as Un } from "./rowKey.js";
|
|
31
|
+
import { jsonPatchAssignments as Wn } from "./jsonPatchAssignments.js";
|
|
32
|
+
import { applyJsonPatch as Gn, compileJsonPatch as Kn, normalizeJsonPatchValue as qn } from "./jsonPatch.js";
|
|
33
|
+
import { EagerCardinalityError as Jn, attachEagerLoads as Yn, hasEagerLoads as Xn, oneCardinalityMessage as Zn } from "./joinCompiler.js";
|
|
34
|
+
import { coerceValueForSqlite as Qn } from "./sqliteValueCoercion.js";
|
|
35
|
+
import { TenantNamespaceInvalid as $n, TenantNamespaceUnresolved as er, qualifyTable as tr, resolveTenantNamespace as nr, sanitizeIdentifierFragment as rr } from "./namespace.js";
|
|
36
|
+
import { coercePredicateValue as ir, coercePredicateValues as ar } from "./predicateCoercion.js";
|
|
37
|
+
import { compilePredicate as or, compileRawFragment as sr, compileRowProjection as cr, compileSelect as lr, escapeLike as ur } from "./sqlCompiler.js";
|
|
38
|
+
import { coercePredicateForSqlite as dr, compileEagerJson as fr } from "./jsonEagerCompiler.js";
|
|
39
|
+
import { registerCoreTables as pr, requireActors as mr, requireTenants as hr } from "./coreTablesRegistry.js";
|
|
40
|
+
import { actorsTable as gr } from "./coreTables.js";
|
|
41
|
+
import { changeDelete as _r, changeInsert as vr, changeSoftDelete as yr, changeUpdate as br, externalChangeEvent as xr } from "./changeEvent.js";
|
|
42
|
+
import { committedChangeBatchOf as Sr, emitCommittedChanges as Cr } from "./committedChanges.js";
|
|
43
|
+
import { CHANGE_CLAIM_TTL_ENV as wr, DEFAULT_CHANGE_CLAIM_TTL_HOURS as Tr, OccurrenceCounter as Er, changeDigest as Dr, composeChangeKey as Or, occurrenceWindowMs as kr, parseChangeKey as Ar } from "./changeIdentity.js";
|
|
44
|
+
import { attributionFields as jr, currentWriteAttribution as Mr, runWithWriteAttribution as Nr, withCapturedAttribution as Pr } from "./writeAttribution.js";
|
|
45
|
+
import { attributionKey as Fr, beginLocalWrite as Ir, claimPendingAttribution as Lr, clearPendingAttribution as Rr, endLocalWrite as zr, pendingAttributionCount as Br, registerPendingAttribution as Vr, resolveEchoAttribution as Hr } from "./pendingAttribution.js";
|
|
46
|
+
import { ID_COLUMN_MAX_LENGTH as Ur, derivedRowId as Wr, derivedRowIdLength as Gr } from "./derivedRowId.js";
|
|
47
|
+
import { clearWriteRecorders as Kr, recordsTable as qr, registerWriteRecorder as Jr, runWriteRecorders as Yr, suspendWriteRecorders as Xr, suspendWriteRecordersEffect as Zr, unregisterWriteRecorder as Qr, writeImagesObserved as $r, writeRecordersSuspended as ei } from "./writeRecorder.js";
|
|
48
|
+
import { DEFAULT_EAGER_FALLBACK_WARN_INTERVAL_MS as ti, dbMetricTagCacheSizeForTests as ni, dbOperationsInFlight as ri, makeEagerFallbackReporter as ii, observeDbOp as ai, recordDbOp as oi, resetDbMetricTagCacheForTests as si, resolveEagerFallbackWarnIntervalMs as ci } from "./dbMetrics.js";
|
|
49
|
+
import { SHARED_TRANSACTION_SERVICE as li, TransactionAbortedError as ui, isTransactionAbortedError as di, makeTransactionAbortTracker as fi, onTransaction as pi, runRetryingTransaction as mi, runSavepoint as hi, runStoreTransaction as gi, settleTransactionExit as _i, transactionRetrySchedule as vi } from "./transactionOutcome.js";
|
|
50
|
+
import { MSSQL_TRANSIENT_NUMBERS as yi, MYSQL_TRANSIENT_CODES as bi, POSTGRES_TRANSIENT_STATES as xi, SQLITE_TRANSIENT_CODES as Si, TURSO_TRANSIENT_MESSAGE as Ci, isTransientContention as wi } from "./transientContention.js";
|
|
51
|
+
import { VOLTRO_EXPIRES_MIXIN_ID as Ti, expires as Ei } from "./expiresMixin.js";
|
|
52
|
+
import { VOLTRO_LOCAL_FIRST_MIXIN_ID as Di, isLocalFirst as Oi, localFirst as ki, localFirstTables as Ai } from "./localFirstMixin.js";
|
|
53
|
+
import { TableStreamError as ji, streamTable as Mi } from "./stream.js";
|
|
54
|
+
import { hybridSearch as Ni } from "./hybridSearch.js";
|
|
55
|
+
import { computeEmbedding as Pi, vectorEmbedding as Fi } from "./vectorEmbedding.js";
|
|
56
|
+
import { BranchNameInvalid as Ii, BranchTransitionInvalid as Li, branchNamespaceName as Ri, enforceBranchLimits as zi, isBranchNamespace as Bi, isNeonConnection as Vi, nextBranchState as Hi, planBranch as Ui, planBranchProvision as Wi, planBranchTeardown as Gi, planBranchTeardownFor as Ki, planNeonBranchProvision as qi, planNeonBranchTeardown as Ji, resolveBranchMechanism as Yi } from "./branching.js";
|
|
57
|
+
import { admitBranch as Xi, makeNamespaceBranchExecutor as Zi, provisionBranch as Qi, teardownBranch as $i } from "./branchExecute.js";
|
|
58
|
+
import { TenantRegionUnavailable as ea, TenantResidencyUnresolved as ta, bindResidentStore as na, clearResidencyConfig as ra, getResidencyConfig as ia, isRegionServable as aa, provisionResidentTenant as oa, residentPlacement as sa, resolveTenantHome as ca, setResidencyConfig as la } from "./residency.js";
|
|
59
|
+
import { auditAllTableIndexes as ua, auditTableIndexes as da, formatIndexAuditIssue as fa } from "./indexAudit.js";
|
|
60
|
+
import { defineSeed as pa, fireSchemaChangeSeeds as ma, fireTenantCreateSeeds as ha, isSeedDefinition as ga, setSchemaChangeSeedHook as _a, setTenantCreateSeedHook as va } from "./seed.js";
|
|
61
|
+
import { defineMigration as ya, isMigrationDefinition as ba } from "./migration.js";
|
|
62
|
+
import { FILE_MIGRATION_PATTERN as xa, IrreversibleMigrationError as Sa, MIGRATION_PHASES as Ca, MigrationExpectationFailed as wa, MigrationNeedsSqlClient as Ta, MigrationSkipped as Ea, RewriteUnstableError as Da, TransactionBrokenByBodyError as Oa, irreversible as ka, irreversibleReason as Aa, isFileMigration as ja, migration as Ma } from "./migrations/fileBased.js";
|
|
63
|
+
import { DEFAULT_SOFT_DROP_RETENTION_DAYS as Na, FRAMEWORK_LIVE_TABLES as Pa, STAGING_TABLE_PREFIX as Fa, agedSoftDropSnapshots as Ia, describeAgedSoftDropSnapshots as La, isFrameworkOwnedLiveTable as Ra, isSoftDropSnapshotName as za, isStagingTableName as Ba, softDropSnapshotStamp as Va } from "./migrations/frameworkLiveTables.js";
|
|
64
|
+
import { sqlError as Ha } from "./sqlError.js";
|
|
65
|
+
import { _voltroApiKeysTable as Ua, _voltroApiRoleWorkloadBucketsTable as Wa, _voltroDevicesTable as Ga, _voltroIdempotencyTable as Ka, _voltroKvTable as qa, _voltroMigrationPlansTable as Ja, _voltroMigrationsTable as Ya, _voltroPluginMigrationsTable as Xa, _voltroReplicaObservationsTable as Za, _voltroSchemaOwnerTable as Qa, _voltroSeedsTable as $a, _voltroTenantSelectionsTable as eo, frameworkTables as to } from "./frameworkTables.js";
|
|
66
|
+
import { TENANT_SELECTIONS_TABLE as no, deleteTenantSelection as ro, readTenantSelection as io, tenantSelectionId as ao, writeTenantSelection as oo } from "./tenantSelection.js";
|
|
67
|
+
import { REPLACE_IN_PROGRESS_TABLE as so, STAGING_STALE_MINUTES as co, _voltroReplaceInProgressTable as lo, interruptedReplaceRefusal as uo, stagingLeftoverReport as fo, stagingLeftovers as po, stagingNamesOf as mo, stagingStaleAfterMs as ho } from "./replaceInProgress.js";
|
|
68
|
+
import { stampGeneratedId as go, stampGeneratedIds as _o } from "./stampId.js";
|
|
69
|
+
import { BULK_INSERT_LIMITS as vo, bulkInsertLimitsFor as yo, chunkRowsForInsert as bo, columnsPerRow as xo } from "./bulkInsertLimits.js";
|
|
70
|
+
import { missingConflictColumns as So, missingRequiredColumns as Co } from "./requiredColumns.js";
|
|
71
|
+
import { insertIgnoreRowOutcome as wo, insertManyRows as To, insertRow as Eo, updateManyRow as Do, upsertRow as Oo, upsertRowOutcome as ko } from "./typedStore.js";
|
|
72
|
+
import { CHANGE_LISTENER_CEILING as Ao, raiseChangeListenerCeiling as jo } from "./changeListenerCeiling.js";
|
|
73
|
+
import { isPrimaryKeyConflictError as Mo, primaryKeyConflictError as No } from "./storeErrors.js";
|
|
74
|
+
import { connectionIdentity as Po, normaliseTarget as Fo, sameDatabase as Io } from "./connectionIdentity.js";
|
|
75
|
+
import { clearRetentions as Lo, listRetentionConflicts as Ro, listRetentions as zo, registerRetention as Bo, retentionTtlMsFromEnv as Vo, sweepRetention as Ho } from "./retention.js";
|
|
76
|
+
import { CDC_OFFSETS_TABLE as Uo, _voltroCdcOffsetsTable as Wo, _voltroMssqlCdcOffsetsTable as Go } from "./cdcOffsetsTables.js";
|
|
77
|
+
import { DATA_TRANSFERS_TABLE as Ko, _voltroDataTransfersTable as qo, describeTransferRun as Jo } from "./dataTransfers.js";
|
|
78
|
+
import { SCOPE_KEY_MAX_LENGTH as Yo, scopeKeyOf as Xo } from "./scopeKey.js";
|
|
79
|
+
import { SqlClient as Zo } from "effect/sql";
|
|
79
80
|
//#region src/index.ts
|
|
80
|
-
var
|
|
81
|
+
var Qo = "postgres";
|
|
81
82
|
//#endregion
|
|
82
|
-
export { lt as AUTO_FILLED_COLUMNS, Me as BOUND_ENCRYPTED_PREFIX, oo as BULK_INSERT_LIMITS, Ei as BranchNameInvalid, Di as BranchTransitionInvalid, Mo as CDC_OFFSETS_TABLE, hr as CHANGE_CLAIM_TTL_ENV, yo as CHANGE_LISTENER_CEILING, e as ColumnBuilder, Fo as DATA_TRANSFERS_TABLE, pt as DEFAULT_ACQUIRE_TIMEOUT_MS, gr as DEFAULT_CHANGE_CLAIM_TTL_HOURS, Gr as DEFAULT_EAGER_FALLBACK_WARN_INTERVAL_MS, Ca as DEFAULT_SOFT_DROP_RETENTION_DAYS, wn as DEFAULT_SUBJECT_GRAPH_DEPTH, Ne as ENCRYPTED_PREFIX, Vo as ENGINE, zn as EagerCardinalityError, da as FILE_MIGRATION_PATTERN, wa as FRAMEWORK_LIVE_TABLES, Pe as FieldDecryptionError, Pr as ID_COLUMN_MAX_LENGTH, $t as INITIAL_VERSION, fa as IrreversibleMigrationError, X as MATCHES_NO_ROWS, Je as MAX_IDENTIFIER_LENGTH, pa as MIGRATION_PHASES, li as MSSQL_TRANSIENT_NUMBERS, ui as MYSQL_TRANSIENT_CODES, ma as MigrationExpectationFailed, ha as MigrationNeedsSqlClient, ga as MigrationSkipped, _r as OccurrenceCounter, di as POSTGRES_TRANSIENT_STATES, Xa as REPLACE_IN_PROGRESS_TABLE, _a as RewriteUnstableError, Ro as SCOPE_KEY_MAX_LENGTH, t as SELF_REFERENCE_TARGET, $r as SHARED_TRANSACTION_SERVICE, fi as SQLITE_TRANSIENT_CODES, Za as STAGING_STALE_MINUTES, Ta as STAGING_TABLE_PREFIX, Bo as SqlClient, Ga as TENANT_SELECTIONS_TABLE, pi as TURSO_TRANSIENT_MESSAGE, xi as TableStreamError, Wn as TenantNamespaceInvalid, Gn as TenantNamespaceUnresolved, Wi as TenantRegionUnavailable, Gi as TenantResidencyUnresolved, ei as TransactionAbortedError, va as TransactionBrokenByBodyError, hi as VOLTRO_EXPIRES_MIXIN_ID, _i as VOLTRO_LOCAL_FIRST_MIXIN_ID, en as VersionConflict, Ye as WARN_IDENTIFIER_LENGTH, Na as _voltroApiKeysTable, No as _voltroCdcOffsetsTable, Io as _voltroDataTransfersTable, Pa as _voltroDevicesTable, Fa as _voltroIdempotencyTable, Ia as _voltroKvTable, La as _voltroMigrationPlansTable, Ra as _voltroMigrationsTable, Po as _voltroMssqlCdcOffsetsTable, za as _voltroPluginMigrationsTable, Qa as _voltroReplaceInProgressTable, Ba as _voltroReplicaObservationsTable, Va as _voltroSchemaOwnerTable, Ha as _voltroSeedsTable, Ua as _voltroTenantSelectionsTable, sr as actorsTable, Bi as admitBranch, Ea as agedSoftDropSnapshots, Ee as allEnumRenames, _n as allRegisteredRelations, _t as allRegisteredTables, Z as and, In as applyJsonPatch, n as array, Q as arrayContains, $ as arrayHas, ee as arrayOverlaps, Bn as attachEagerLoads, Sr as attributionFields, Er as attributionKey, ea as auditAllTableIndexes, ta as auditTableIndexes, R as authoredError, z as authoredMessageOf, Tt as avg, Et as avgOver, Dr as beginLocalWrite, r as bigint, Ki as bindResidentStore, i as boolean, Oi as branchNamespaceName, so as bulkInsertLimitsFor, a as bytes, B as causeBranches, cr as changeDelete, vr as changeDigest, lr as changeInsert, ur as changeSoftDelete, dr as changeUpdate, co as chunkRowsForInsert, Or as claimPendingAttribution, V as classifyConstraintViolation, De as clearEnumRenames, kr as clearPendingAttribution, vn as clearRelationsRegistry, qi as clearResidencyConfig, Eo as clearRetentions, vt as clearTableRegistry, Lr as clearWriteRecorders, nr as coercePredicateForSqlite, Yn as coercePredicateValue, Xn as coercePredicateValues, Un as coerceValueForSqlite, te as collectSubqueries, Dt as column, I as columnRef, sn as columnSchema, lo as columnsPerRow, pr as committedChangeBatchOf, Y as compareDecimal, rr as compileEagerJson, Ln as compileJsonPatch, Zn as compilePredicate, Qn as compileRawFragment, $n as compileRowProjection, er as compileSelect, yr as composeChangeKey, wi as computeEmbedding, Co as connectionIdentity, ne as contains, Ot as count, kt as countDistinct, o as crdtCounter, s as crdtDoc, c as crdtManagedColumns, l as crdtManagedColumnsOf, u as crdtSealed, d as crdtText, Cr as currentWriteAttribution, At as databaseHandle, f as date, p as dbEnum, Kr as dbMetricTagCacheSizeForTests, qr as dbOperationsInFlight, m as decimal, Oe as declareEnumRename, Fe as decodeFieldValue, Dn as decodeRowsForTable, On as decodeRowsFromSchema, Ie as decryptFieldsOnRead, la as defineMigration, ot as defineMixin, ra as defineSeed, Ka as deleteTenantSelection, jt as denseRank, Tn as deriveSubjectGraph, rt as deriveTypeIdPrefix, Fr as derivedRowId, Ir as derivedRowIdLength, Da as describeAgedSoftDropSnapshots, H as describeCharsetRefusal, U as describeDriverError, W as describeRowBindings, Lo as describeTransferRun, Ae as deserializeArraysOnRead, Xe as drainIdentifierWarnings, h as dropped, mr as emitCommittedChanges, Le as encodeFieldValue, kn as encodeRowForSchema, Re as encryptFieldsForWrite, ze as encryptFieldsForWriteBatch, Be as encryptedColumnsOf, Ar as endLocalWrite, ki as enforceBranchLimits, yt as ensureTableRegistered, re as eq, tr as escapeLike, ie as evaluatePredicate, Mt as except, ae as exists, gi as expires, fr as externalChangeEvent, G as extractDbCause, Ve as fieldBinding, ia as fireSchemaChangeSeeds, aa as fireTenantCreateSeeds, na as formatIndexAuditIssue, En as formatSubjectGraph, Wa as frameworkTables, it as generateId, tt as generateSnowflake, g as geography, _ as geometry, ke as getEnumRenames, yn as getRelation, bn as getRelations, Ji as getResidencyConfig, bt as getTable, oe as gt, se as gte, Vn as hasEagerLoads, Ci as hybridSearch, v as id, ce as inSet, le as inSubquery, ln as inferForeignKey, po as insertIgnoreRowOutcome, mo as insertManyRows, ho as insertRow, y as integer, $a as interruptedReplaceRefusal, Nt as intersect, b as interval, ya as irreversible, ba as irreversibleReason, He as isBoundCiphertext, Ai as isBranchNamespace, L as isColumnReference, Mn as isCompositeRowKey, un as isEmptyRelationsSpec, Ue as isEncrypted, We as isFieldDecryptionError, xa as isFileMigration, K as isForeignKeyViolation, Oa as isFrameworkOwnedLiveTable, vi as isLocalFirst, ua as isMigrationDefinition, mt as isMysqlFamily, ji as isNeonConnection, ue as isNotNull, de as isNull, xo as isPrimaryKeyConflictError, q as isQueryTimeout, Ge as isRawEncoding, Yi as isRegionServable, dn as isRelationsSpec, oa as isSeedDefinition, ka as isSoftDropSnapshotName, ht as isSqliteFamily, Aa as isStagingTableName, xt as isTableReactive, ti as isTransactionAbortedError, mi as isTransientContention, Yt as isView, x as json, fe as jsonField, ut as jsonIndex, Fn as jsonPatchAssignments, Pt as lag, Ft as lead, Do as listRetentionConflicts, Oo as listRetentions, yi as localFirst, bi as localFirstTables, pe as lt, me as lte, Jr as makeEagerFallbackReporter, Vi as makeNamespaceBranchExecutor, ni as makeTransactionAbortTracker, fn as many, pn as manyToMany, S as materializeFields, It as max, Sa as migration, Lt as min, uo as missingConflictColumns, fo as missingRequiredColumns, st as mixin, he as neq, Mi as nextBranchState, wo as normaliseTarget, Rn as normalizeJsonPatchValue, ge as not, _e as notExists, ve as notInSet, ye as notInSubquery, C as numeric, Yr as observeDbOp, br as occurrenceWindowMs, ri as onTransaction, mn as one, Hn as oneCardinalityMessage, be as or, Rt as orderClausesOf, zt as paginateBy, Bt as paginateById, xr as parseChangeKey, jr as pendingAttributionCount, w as persistedColumns, Ni as planBranch, Pi as planBranchProvision, Fi as planBranchTeardown, Ii as planBranchTeardownFor, Li as planNeonBranchProvision, Ri as planNeonBranchTeardown, tn as planVersionedUpdate, P as pluginRef, F as pluginRefSpecOf, xe as preparePredicate, So as primaryKeyConflictError, Hi as provisionBranch, Xi as provisionResidentTenant, Kn as qualifyTable, Vt as queryFor, Xt as queryForView, gt as quoteIdent, bo as raiseChangeListenerCeiling, Ht as rank, T as raw, qa as readTenantSelection, E as readableByColumns, D as real, Xr as recordDbOp, Rr as recordsTable, O as reference, Ke as refuseWrite, ir as registerCoreTables, xn as registerDiscoveredRelations, Mr as registerPendingAttribution, Sn as registerRelations, ko as registerRetention, St as registerTable, zr as registerWriteRecorder, hn as relations, ar as requireActors, Ct as requireTable, or as requireTenants, Zr as resetDbMetricTagCacheForTests, nt as resetSnowflake, Zi as residentPlacement, Te as resolveActorSnapshot, zi as resolveBranchMechanism, Qr as resolveEagerFallbackWarnIntervalMs, Nr as resolveEchoAttribution, Ut as resolveFullTextIndex, at as resolveIdScheme, ct as resolveMixinGraph, Qi as resolveTenantHome, qn as resolveTenantNamespace, Ao as retentionTtlMsFromEnv, Nn as rowKeyColumns, Pn as rowKeyIdentity, Wt as rowNumber, cn as rowSchema, ii as runRetryingTransaction, ai as runSavepoint, oi as runStoreTransaction, wr as runWithWriteAttribution, Br as runWriteRecorders, To as sameDatabase, Jn as sanitizeIdentifierFragment, zo as scopeKeyOf, k as selfReference, je as serializeArraysForWrite, A as serverOnlyColumns, $i as setResidencyConfig, sa as setSchemaChangeSeedHook, ca as setTenantCreateSeedHook, si as settleTransactionExit, nn as settleVersionedUpdate, ja as softDropSnapshotStamp, Se as spatialPredicate, Ma as sqlError, eo as stagingLeftoverReport, to as stagingLeftovers, no as stagingNamesOf, ro as stagingStaleAfterMs, io as stampGeneratedId, ao as stampGeneratedIds, Ce as startsWith, qe as storeRefusalOf, Si as streamTable, Gt as sum, Kt as sumOver, Vr as suspendWriteRecorders, Hr as suspendWriteRecordersEffect, jo as sweepRetention, dt as table, Ui as teardownBranch, Ja as tenantSelectionId, j as text, M as timestamp, an as timestampMs, on as timestampMsOrNull, ci as transactionRetrySchedule, qt as union, Jt as unionAll, wt as unregisterTable, Ur as unregisterWriteRecorder, go as updateManyRow, _o as upsertRow, vo as upsertRowOutcome, An as upsertUpdatePatch, jn as upsertUpdateValues, Ze as validateColumnName, Qe as validateIndexName, Cn as validateRegisteredRelations, gn as validateRelationConfig, $e as validateTableName, et as validateTypeIdPrefix, N as vector, ft as vectorDistanceToOpclass, Ti as vectorEmbedding, rn as versionColumnOf, Zt as view, Qt as viewSql, we as walkLeaves, J as wireSafeCause, Tr as withCapturedAttribution, Wr as writeRecordersSuspended, Ya as writeTenantSelection };
|
|
83
|
+
export { _t as AUTO_FILLED_COLUMNS, Ne as BOUND_ENCRYPTED_PREFIX, vo as BULK_INSERT_LIMITS, Ii as BranchNameInvalid, Li as BranchTransitionInvalid, Uo as CDC_OFFSETS_TABLE, wr as CHANGE_CLAIM_TTL_ENV, Ao as CHANGE_LISTENER_CEILING, e as ColumnBuilder, Ko as DATA_TRANSFERS_TABLE, xt as DEFAULT_ACQUIRE_TIMEOUT_MS, Tr as DEFAULT_CHANGE_CLAIM_TTL_HOURS, ti as DEFAULT_EAGER_FALLBACK_WARN_INTERVAL_MS, Na as DEFAULT_SOFT_DROP_RETENTION_DAYS, Mn as DEFAULT_SUBJECT_GRAPH_DEPTH, Pe as ENCRYPTED_PREFIX, Qo as ENGINE, Jn as EagerCardinalityError, Fe as FIELD_KEY_ID_PATTERN, xa as FILE_MIGRATION_PATTERN, Pa as FRAMEWORK_LIVE_TABLES, Ie as FieldDecryptionError, Ur as ID_COLUMN_MAX_LENGTH, cn as INITIAL_VERSION, Sa as IrreversibleMigrationError, Z as MATCHES_NO_ROWS, $e as MAX_IDENTIFIER_LENGTH, Ca as MIGRATION_PHASES, yi as MSSQL_TRANSIENT_NUMBERS, bi as MYSQL_TRANSIENT_CODES, wa as MigrationExpectationFailed, Ta as MigrationNeedsSqlClient, Ea as MigrationSkipped, Er as OccurrenceCounter, xi as POSTGRES_TRANSIENT_STATES, so as REPLACE_IN_PROGRESS_TABLE, Da as RewriteUnstableError, Yo as SCOPE_KEY_MAX_LENGTH, t as SELF_REFERENCE_TARGET, li as SHARED_TRANSACTION_SERVICE, Si as SQLITE_TRANSIENT_CODES, co as STAGING_STALE_MINUTES, Fa as STAGING_TABLE_PREFIX, Zo as SqlClient, no as TENANT_SELECTIONS_TABLE, Ci as TURSO_TRANSIENT_MESSAGE, ji as TableStreamError, $n as TenantNamespaceInvalid, er as TenantNamespaceUnresolved, ea as TenantRegionUnavailable, ta as TenantResidencyUnresolved, ui as TransactionAbortedError, Oa as TransactionBrokenByBodyError, Ti as VOLTRO_EXPIRES_MIXIN_ID, Di as VOLTRO_LOCAL_FIRST_MIXIN_ID, ln as VersionConflict, et as WARN_IDENTIFIER_LENGTH, Ua as _voltroApiKeysTable, Wa as _voltroApiRoleWorkloadBucketsTable, Wo as _voltroCdcOffsetsTable, qo as _voltroDataTransfersTable, Ga as _voltroDevicesTable, Ka as _voltroIdempotencyTable, qa as _voltroKvTable, Ja as _voltroMigrationPlansTable, Ya as _voltroMigrationsTable, Go as _voltroMssqlCdcOffsetsTable, Xa as _voltroPluginMigrationsTable, lo as _voltroReplaceInProgressTable, Za as _voltroReplicaObservationsTable, Qa as _voltroSchemaOwnerTable, $a as _voltroSeedsTable, eo as _voltroTenantSelectionsTable, gr as actorsTable, Xi as admitBranch, Ia as agedSoftDropSnapshots, De as allEnumRenames, Tn as allRegisteredRelations, Tt as allRegisteredTables, Q as and, Gn as applyJsonPatch, n as array, $ as arrayContains, ee as arrayHas, te as arrayOverlaps, Yn as attachEagerLoads, jr as attributionFields, Fr as attributionKey, ua as auditAllTableIndexes, da as auditTableIndexes, R as authoredError, z as authoredMessageOf, Nt as avg, Pt as avgOver, Ir as beginLocalWrite, r as bigint, na as bindResidentStore, i as boolean, Ri as branchNamespaceName, yo as bulkInsertLimitsFor, a as bytes, B as causeBranches, _r as changeDelete, Dr as changeDigest, vr as changeInsert, yr as changeSoftDelete, br as changeUpdate, bo as chunkRowsForInsert, Le as ciphertextKeyId, Lr as claimPendingAttribution, V as classifyConstraintViolation, Oe as clearEnumRenames, Rr as clearPendingAttribution, En as clearRelationsRegistry, ra as clearResidencyConfig, Lo as clearRetentions, Et as clearTableRegistry, Kr as clearWriteRecorders, dr as coercePredicateForSqlite, ir as coercePredicateValue, ar as coercePredicateValues, Qn as coerceValueForSqlite, ne as collectSubqueries, Ft as column, I as columnRef, hn as columnSchema, xo as columnsPerRow, Sr as committedChangeBatchOf, Y as compareDecimal, fr as compileEagerJson, Kn as compileJsonPatch, or as compilePredicate, sr as compileRawFragment, cr as compileRowProjection, lr as compileSelect, Or as composeChangeKey, Pi as computeEmbedding, Po as connectionIdentity, re as contains, It as count, Lt as countDistinct, o as crdtCounter, s as crdtDoc, c as crdtManagedColumns, l as crdtManagedColumnsOf, u as crdtSealed, d as crdtText, Mr as currentWriteAttribution, Rt as databaseHandle, f as date, p as dbEnum, ni as dbMetricTagCacheSizeForTests, ri as dbOperationsInFlight, m as decimal, X as decimalEqualityKey, ke as declareEnumRename, Re as decodeFieldValue, Fn as decodeRowsForTable, In as decodeRowsFromSchema, Ln as decodeSelectRows, ze as decryptFieldsOnRead, ya as defineMigration, mt as defineMixin, pa as defineSeed, ro as deleteTenantSelection, zt as denseRank, Nn as deriveSubjectGraph, dt as deriveTypeIdPrefix, Wr as derivedRowId, Gr as derivedRowIdLength, La as describeAgedSoftDropSnapshots, H as describeCharsetRefusal, U as describeDriverError, W as describeRowBindings, Jo as describeTransferRun, je as deserializeArraysOnRead, tt as drainIdentifierWarnings, h as dropped, Cr as emitCommittedChanges, Be as encodeFieldValue, Rn as encodeRowForSchema, ot as encodeTypeIdSuffix, Ve as encryptFieldsForWrite, He as encryptFieldsForWriteBatch, Ue as encryptedColumnsOf, zr as endLocalWrite, zi as enforceBranchLimits, Dt as ensureTableRegistered, ie as eq, ur as escapeLike, ae as evaluatePredicate, Bt as except, oe as exists, Ei as expires, xr as externalChangeEvent, G as extractDbCause, We as fieldBinding, Ge as fieldBindingsOf, ma as fireSchemaChangeSeeds, ha as fireTenantCreateSeeds, fa as formatIndexAuditIssue, Pn as formatSubjectGraph, to as frameworkTables, ft as generateId, lt as generateSnowflake, g as geography, _ as geometry, Ae as getEnumRenames, Dn as getRelation, On as getRelations, ia as getResidencyConfig, Ot as getTable, se as gt, ce as gte, Xn as hasEagerLoads, Ni as hybridSearch, v as id, le as inSet, ue as inSubquery, _n as inferForeignKey, wo as insertIgnoreRowOutcome, To as insertManyRows, Eo as insertRow, y as integer, uo as interruptedReplaceRefusal, Vt as intersect, b as interval, ka as irreversible, Aa as irreversibleReason, Ke as isBoundCiphertext, Bi as isBranchNamespace, L as isColumnReference, Vn as isCompositeRowKey, vn as isEmptyRelationsSpec, qe as isEncrypted, Je as isFieldDecryptionError, ja as isFileMigration, K as isForeignKeyViolation, Ra as isFrameworkOwnedLiveTable, Oi as isLocalFirst, ba as isMigrationDefinition, St as isMysqlFamily, Vi as isNeonConnection, de as isNotNull, fe as isNull, Mo as isPrimaryKeyConflictError, q as isQueryTimeout, Ye as isRawEncoding, aa as isRegionServable, yn as isRelationsSpec, ga as isSeedDefinition, za as isSoftDropSnapshotName, Ct as isSqliteFamily, Ba as isStagingTableName, kt as isTableReactive, di as isTransactionAbortedError, wi as isTransientContention, rn as isView, x as json, pe as jsonField, vt as jsonIndex, Wn as jsonPatchAssignments, Ht as lag, Ut as lead, Ro as listRetentionConflicts, zo as listRetentions, ki as localFirst, Ai as localFirstTables, me as lt, he as lte, ii as makeEagerFallbackReporter, Zi as makeNamespaceBranchExecutor, fi as makeTransactionAbortTracker, bn as many, xn as manyToMany, S as materializeFields, Wt as max, Ma as migration, Gt as min, So as missingConflictColumns, Co as missingRequiredColumns, ht as mixin, ge as neq, Hi as nextBranchState, Fo as normaliseTarget, qn as normalizeJsonPatchValue, _e as not, ve as notExists, ye as notInSet, be as notInSubquery, C as numeric, ai as observeDbOp, kr as occurrenceWindowMs, pi as onTransaction, Sn as one, Zn as oneCardinalityMessage, xe as or, Kt as orderClausesOf, qt as paginateBy, Jt as paginateById, Ar as parseChangeKey, Br as pendingAttributionCount, w as persistedColumns, Ui as planBranch, Wi as planBranchProvision, Gi as planBranchTeardown, Ki as planBranchTeardownFor, qi as planNeonBranchProvision, Ji as planNeonBranchTeardown, un as planVersionedUpdate, P as pluginRef, F as pluginRefSpecOf, Se as preparePredicate, No as primaryKeyConflictError, Qi as provisionBranch, oa as provisionResidentTenant, tr as qualifyTable, Yt as queryFor, an as queryForView, wt as quoteIdent, jo as raiseChangeListenerCeiling, Xt as rank, T as raw, io as readTenantSelection, E as readableByColumns, D as real, oi as recordDbOp, qr as recordsTable, O as reference, Xe as refuseIdChangeOfSealedRow, Ze as refuseWrite, pr as registerCoreTables, kn as registerDiscoveredRelations, Vr as registerPendingAttribution, An as registerRelations, Bo as registerRetention, At as registerTable, Jr as registerWriteRecorder, Cn as relations, mr as requireActors, jt as requireTable, hr as requireTenants, si as resetDbMetricTagCacheForTests, ut as resetSnowflake, sa as residentPlacement, Ee as resolveActorSnapshot, Yi as resolveBranchMechanism, ci as resolveEagerFallbackWarnIntervalMs, Hr as resolveEchoAttribution, Zt as resolveFullTextIndex, pt as resolveIdScheme, gt as resolveMixinGraph, ca as resolveTenantHome, nr as resolveTenantNamespace, Vo as retentionTtlMsFromEnv, Hn as rowKeyColumns, Un as rowKeyIdentity, Qt as rowNumber, gn as rowSchema, mi as runRetryingTransaction, hi as runSavepoint, gi as runStoreTransaction, Nr as runWithWriteAttribution, Yr as runWriteRecorders, Io as sameDatabase, rr as sanitizeIdentifierFragment, Xo as scopeKeyOf, k as selfReference, Me as serializeArraysForWrite, A as serverOnlyColumns, la as setResidencyConfig, _a as setSchemaChangeSeedHook, va as setTenantCreateSeedHook, _i as settleTransactionExit, dn as settleVersionedUpdate, Va as softDropSnapshotStamp, Ce as spatialPredicate, Ha as sqlError, fo as stagingLeftoverReport, po as stagingLeftovers, mo as stagingNamesOf, ho as stagingStaleAfterMs, go as stampGeneratedId, _o as stampGeneratedIds, we as startsWith, Qe as storeRefusalOf, Mi as streamTable, $t as sum, en as sumOver, Xr as suspendWriteRecorders, Zr as suspendWriteRecordersEffect, Ho as sweepRetention, yt as table, $i as teardownBranch, ao as tenantSelectionId, j as text, M as timestamp, pn as timestampMs, mn as timestampMsOrNull, vi as transactionRetrySchedule, st as typeId, tn as union, nn as unionAll, Mt as unregisterTable, Qr as unregisterWriteRecorder, Do as updateManyRow, Oo as upsertRow, ko as upsertRowOutcome, zn as upsertUpdatePatch, Bn as upsertUpdateValues, ct as uuidV7Bytes, nt as validateColumnName, rt as validateIndexName, jn as validateRegisteredRelations, wn as validateRelationConfig, it as validateTableName, at as validateTypeIdPrefix, N as vector, bt as vectorDistanceToOpclass, Fi as vectorEmbedding, fn as versionColumnOf, on as view, sn as viewSql, Te as walkLeaves, J as wireSafeCause, Pr as withCapturedAttribution, $r as writeImagesObserved, ei as writeRecordersSuspended, oo as writeTenantSelection };
|