@lunora/shard-engine 1.0.0-alpha.3 → 1.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/conformance/index.mjs +1 -1
- package/dist/index.d.mts +191 -20
- package/dist/index.d.ts +191 -20
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/ADMIN_FUNCTIONS-Ddr79XHG.mjs +1 -0
- package/dist/packem_shared/AGGREGATE_SQL_FUNCTION-m1iUU1rv.mjs +1 -0
- package/dist/packem_shared/AGG_COUNT-DOlqqroz.mjs +1 -0
- package/dist/packem_shared/AUDIT_LOG_TABLE-uNVU9O1W.mjs +8 -0
- package/dist/packem_shared/CDC_LOG_TABLE-B58N8NQO.mjs +8 -0
- package/dist/packem_shared/CLIENT_WATERMARK_TABLE-BoS1HEqz.mjs +7 -0
- package/dist/packem_shared/CountRlsUnsupportedError-Bdfupt3g.mjs +1 -0
- package/dist/packem_shared/DATA_MIGRATION_STATE_TABLE-4l6aU1Vc.mjs +31 -0
- package/dist/packem_shared/DEFAULT_MAX_RELATION_KEYS-BAWGIEvC.mjs +1 -0
- package/dist/packem_shared/DEFAULT_MAX_RELAYS-DeVcEXBh.mjs +1 -0
- package/dist/packem_shared/DEFAULT_PROMOTION_THRESHOLDS-DVTD9iu0.mjs +1 -0
- package/dist/packem_shared/DEFAULT_TRANSACTION_LIMITS-Bcoi7Bvf.mjs +1 -0
- package/dist/packem_shared/DurableStreamRunner-Bm6KDMBU.mjs +1 -0
- package/dist/packem_shared/GEO_DEFAULT_PRECISION-CqpQZ-J_.mjs +1 -0
- package/dist/packem_shared/GLOBAL_SHAPE_SNAPSHOT_TABLE-NWaL77m5.mjs +7 -0
- package/dist/packem_shared/IDEMPOTENCY_TABLE-DKVe2Ohf.mjs +7 -0
- package/dist/packem_shared/MAIL_RETENTION-Cig9Dmc8.mjs +18 -0
- package/dist/packem_shared/MAX_SQL_ROWS-DnDyeZph.mjs +2 -0
- package/dist/packem_shared/NotUniqueError-BixDiv4O.mjs +1 -0
- package/dist/packem_shared/QUEUE_TABLE-zj9Tt6tk.mjs +17 -0
- package/dist/packem_shared/RANK_TIEBREAK-ci3MaM65.mjs +1 -0
- package/dist/packem_shared/RELATION_EXISTS_KEY-CFUhnZSZ.mjs +1 -0
- package/dist/packem_shared/REPROJECTION_MIGRATION_PREFIX-Czcb6_mO.mjs +1 -0
- package/dist/packem_shared/RLS_UNWRAP_SYMBOL-BWloGsd3.mjs +1 -0
- package/dist/packem_shared/ReactiveCache-DfyeaJOA.mjs +1 -0
- package/dist/packem_shared/SCAN_DEP-D7qE3iUe.mjs +1 -0
- package/dist/packem_shared/SCHEMA_HISTORY_MAX_VERSIONS-DsycDXWm.mjs +6 -0
- package/dist/packem_shared/SEARCH_STATE_TABLE-Dju8ebbU.mjs +1 -0
- package/dist/packem_shared/SHAPE_POKE_CURSOR_TABLE-Dh4HfSdC.mjs +7 -0
- package/dist/packem_shared/ShardRunner-C9p5DVOx.mjs +1 -0
- package/dist/packem_shared/aggregateTableName-Cy5e03oz.mjs +1 -0
- package/dist/packem_shared/appendStreamChunk-CH4e4nJn.mjs +19 -0
- package/dist/packem_shared/applyOnDelete-BlcwKjuO.mjs +1 -0
- package/dist/packem_shared/applySelect-BQbHyo-W.mjs +1 -0
- package/dist/packem_shared/{armRestore-BNzdvQ_o.mjs → armRestore-Bu1_8SUa.mjs} +1 -1
- package/dist/packem_shared/awaitWsDrain-kSGvAfw1.mjs +1 -0
- package/dist/packem_shared/backfillAggregateIndexes-DVQ2sVuV.mjs +1 -0
- package/dist/packem_shared/base64-DfpzS4o_.mjs +1 -0
- package/dist/packem_shared/buildIndexRange-CBKQmHSS.mjs +1 -0
- package/dist/packem_shared/buildPokeFrames-BXejpiII.mjs +1 -0
- package/dist/packem_shared/buildReprojectionMigration-8nVn8Qwb.mjs +1 -0
- package/dist/packem_shared/buildSettings-B4igo4rJ.mjs +1 -0
- package/dist/packem_shared/compileWhereSql-JBpSfQm9.mjs +1 -0
- package/dist/packem_shared/computeRankPage-Bby1Npkd.mjs +1 -0
- package/dist/packem_shared/createCompanionSync-zCwaB6wj.mjs +1 -0
- package/dist/packem_shared/createReadFootprint-MRH1If3F.mjs +1 -0
- package/dist/packem_shared/createReplicaLink-C1JuP_DN.mjs +7 -0
- package/dist/packem_shared/createSystemReader-BtYeSMDb.mjs +1 -0
- package/dist/packem_shared/ctx-db-companions-lTt-rvKG.mjs +1 -0
- package/dist/packem_shared/defineEngineContractSuite-0XtjRA7F.mjs +1 -0
- package/dist/packem_shared/diffExternalSource-pozJ4UdZ.mjs +1 -0
- package/dist/packem_shared/do-sql-Dk_DJxn4.mjs +1 -0
- package/dist/packem_shared/estimate-bytes-CzG5x1f8.mjs +1 -0
- package/dist/packem_shared/exportShardRows-Cgt3ITwH.mjs +1 -0
- package/dist/packem_shared/hasTrigger-CjlwI4le.mjs +1 -0
- package/dist/packem_shared/isSoftDeleted-DcGB0pov.mjs +9 -0
- package/dist/packem_shared/liftSourceId-CA3ENhXj.mjs +1 -0
- package/dist/packem_shared/materializeExternalRows-Drn0FGdb.mjs +1 -0
- package/dist/packem_shared/mergeChangedKeys-D1T-TPUb.mjs +1 -0
- package/dist/packem_shared/param-Ib8WHnrF.mjs +1 -0
- package/dist/packem_shared/quoteIdentifier-CObIFRhb.mjs +1 -0
- package/dist/packem_shared/runDrizzle-it6rL9bR.mjs +1 -0
- package/dist/packem_shared/runShardMigrations-Crppyq1f.mjs +5 -0
- package/dist/packem_shared/runSocketPool-CZJ2X9cF.mjs +1 -0
- package/dist/packem_shared/selectExpiredIds-_5514W_v.mjs +1 -0
- package/dist/packem_shared/selectShapeMemberIds-B-pQJHAu.mjs +1 -0
- package/dist/packem_shared/serializeSqlValue-DbI1VQYM.mjs +1 -0
- package/dist/packem_shared/sibling-channel-BRZpLiDA.mjs +1 -0
- package/dist/packem_shared/sql-projection-BqmxFxQU.mjs +1 -0
- package/dist/packem_shared/stableStringify-CujpENIO.mjs +1 -0
- package/dist/packem_shared/stableWireKey-BYB5GQJa.mjs +1 -0
- package/dist/packem_shared/wire-codec-BU9T2xJ7.mjs +1 -0
- package/package.json +3 -3
- package/dist/packem_shared/ADMIN_FUNCTIONS-B0xlQJ4w.mjs +0 -1
- package/dist/packem_shared/AGGREGATE_SQL_FUNCTION-QYaiuty4.mjs +0 -1
- package/dist/packem_shared/AGG_COUNT-BWXe3gtQ.mjs +0 -1
- package/dist/packem_shared/AUDIT_LOG_TABLE-CaA0jL0L.mjs +0 -8
- package/dist/packem_shared/CDC_LOG_TABLE-BnqlH2eZ.mjs +0 -8
- package/dist/packem_shared/CLIENT_WATERMARK_TABLE-CXsSLU8D.mjs +0 -7
- package/dist/packem_shared/CountRlsUnsupportedError-B2WKJD9v.mjs +0 -1
- package/dist/packem_shared/DATA_MIGRATION_STATE_TABLE-CaO6L0Ee.mjs +0 -31
- package/dist/packem_shared/DEFAULT_MAX_RELATION_KEYS-bq00btqV.mjs +0 -1
- package/dist/packem_shared/DEFAULT_MAX_RELAYS-CnCyh6oX.mjs +0 -1
- package/dist/packem_shared/DEFAULT_PROMOTION_THRESHOLDS-Dteg0sZF.mjs +0 -1
- package/dist/packem_shared/DEFAULT_TRANSACTION_LIMITS--TtB8Gpo.mjs +0 -1
- package/dist/packem_shared/FTS_COUNT_COLUMN-D1gY3wwZ-CZHdaRrd.mjs +0 -1
- package/dist/packem_shared/GEO_DEFAULT_PRECISION-okRCkZ6r.mjs +0 -1
- package/dist/packem_shared/GLOBAL_SHAPE_SNAPSHOT_TABLE-DX-6-gBP.mjs +0 -7
- package/dist/packem_shared/IDEMPOTENCY_TABLE-DjkEMp6w.mjs +0 -7
- package/dist/packem_shared/MAIL_RETENTION-KmozO2NQ.mjs +0 -18
- package/dist/packem_shared/MAX_SQL_ROWS-nMwkxv5f.mjs +0 -2
- package/dist/packem_shared/NotUniqueError-iGKd9wRR.mjs +0 -1
- package/dist/packem_shared/QUEUE_TABLE-DYCDvzTG.mjs +0 -17
- package/dist/packem_shared/RANK_TIEBREAK-9NU5s_mi.mjs +0 -1
- package/dist/packem_shared/RELATION_EXISTS_KEY-BaqSIFU1.mjs +0 -1
- package/dist/packem_shared/RLS_UNWRAP_SYMBOL-C6_WX3dG.mjs +0 -1
- package/dist/packem_shared/ReactiveCache-CF21t8IB.mjs +0 -1
- package/dist/packem_shared/SCAN_DEP-D_yR9EeV.mjs +0 -1
- package/dist/packem_shared/SCHEMA_HISTORY_MAX_VERSIONS-CHXz6p_z.mjs +0 -6
- package/dist/packem_shared/SEARCH_STATE_TABLE-eLN8U5tz.mjs +0 -1
- package/dist/packem_shared/ShardRunner-DIqVdWtk.mjs +0 -1
- package/dist/packem_shared/aggregateTableName-G-eXyjcz.mjs +0 -1
- package/dist/packem_shared/applyOnDelete-uFRC5p1d.mjs +0 -1
- package/dist/packem_shared/applySelect-B0CF8T7y.mjs +0 -1
- package/dist/packem_shared/awaitWsDrain-Dk50ISgE.mjs +0 -1
- package/dist/packem_shared/backfillAggregateIndexes-BHiewuB-.mjs +0 -1
- package/dist/packem_shared/buildIndexRange-DIjFVgeO.mjs +0 -1
- package/dist/packem_shared/buildPokeFrames-DaPpm5Ss.mjs +0 -1
- package/dist/packem_shared/buildSettings-DT18_DkX.mjs +0 -1
- package/dist/packem_shared/compileWhereSql-BLcfs4QW.mjs +0 -1
- package/dist/packem_shared/computeRankPage-IUSS-zIB.mjs +0 -1
- package/dist/packem_shared/createCompanionSync-DWK0Vlg1.mjs +0 -1
- package/dist/packem_shared/createReadFootprint-DIrrxRTE.mjs +0 -1
- package/dist/packem_shared/createSystemReader-DcDcrtM3.mjs +0 -1
- package/dist/packem_shared/defineEngineContractSuite-BefTibvY.mjs +0 -1
- package/dist/packem_shared/diffExternalSource-DMpkJta1.mjs +0 -1
- package/dist/packem_shared/estimate-bytes-DzD3PdCc.mjs +0 -1
- package/dist/packem_shared/exportShardRows-kt42wijd.mjs +0 -1
- package/dist/packem_shared/hasTrigger-CbkOHExZ.mjs +0 -1
- package/dist/packem_shared/isSoftDeleted-B-SXkGUo.mjs +0 -9
- package/dist/packem_shared/liftSourceId-DApAbu7Q.mjs +0 -1
- package/dist/packem_shared/materializeExternalRows-DOQJV9p2.mjs +0 -1
- package/dist/packem_shared/mergeChangedKeys-CvSHlkv-.mjs +0 -1
- package/dist/packem_shared/param-B5lF5Jd9.mjs +0 -1
- package/dist/packem_shared/quote-identifier-CGiYFBvY.mjs +0 -1
- package/dist/packem_shared/runDrizzle-GKR3y97k.mjs +0 -1
- package/dist/packem_shared/runShardMigrations-CPxqCh3O.mjs +0 -5
- package/dist/packem_shared/runSocketPool-DPQLVyWF.mjs +0 -1
- package/dist/packem_shared/selectExpiredIds-FzhIEeG1.mjs +0 -1
- package/dist/packem_shared/selectShapeMemberIds-DvE7K6zG.mjs +0 -1
- package/dist/packem_shared/serializeSqlValue-DnpyaLcw.mjs +0 -1
- package/dist/packem_shared/stableStringify-BjLh4gvA.mjs +0 -1
- package/dist/packem_shared/stableWireKey-YEHLaX6X.mjs +0 -1
- package/dist/packem_shared/wire-codec-Ctnni0h6.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineEngineContractSuite as t}from"../packem_shared/defineEngineContractSuite-
|
|
1
|
+
import{defineEngineContractSuite as t}from"../packem_shared/defineEngineContractSuite-0XtjRA7F.mjs";export{t as defineEngineContractSuite};
|
package/dist/index.d.mts
CHANGED
|
@@ -230,6 +230,7 @@ interface ResolveWithOptions {
|
|
|
230
230
|
groupedCounter: (tableName: string, whereField: string, values: unknown[], policyWhere?: WhereInput) => Promise<Map<unknown, number>>;
|
|
231
231
|
parents: Record<string, unknown>[];
|
|
232
232
|
relationBaseWhere?: (table: string) => undefined | WhereInput;
|
|
233
|
+
relationMask?: RelationMask;
|
|
233
234
|
schema: {
|
|
234
235
|
readonly tables: Record<string, TableDefinitionLike>;
|
|
235
236
|
};
|
|
@@ -250,11 +251,19 @@ interface QueryArgs {
|
|
|
250
251
|
limit?: number;
|
|
251
252
|
orderBy?: OrderByInput[];
|
|
252
253
|
relationBaseWhere?: (table: string) => undefined | WhereInput;
|
|
254
|
+
relationMask?: RelationMask;
|
|
253
255
|
restrictsCounts?: boolean;
|
|
254
256
|
select?: ReadonlyArray<string>;
|
|
255
257
|
where?: WhereInput;
|
|
256
258
|
with?: WithInput;
|
|
257
259
|
}
|
|
260
|
+
interface CrossShardReadArgs {
|
|
261
|
+
orderBy?: OrderByInput[];
|
|
262
|
+
relationPolicies?: Record<string, WhereInput>;
|
|
263
|
+
where?: WhereInput;
|
|
264
|
+
with?: WithInput;
|
|
265
|
+
}
|
|
266
|
+
type RelationMask = (table: string, rows: Record<string, unknown>[]) => Record<string, unknown>[];
|
|
258
267
|
interface QueryPage {
|
|
259
268
|
continueCursor: null | string;
|
|
260
269
|
isDone: boolean;
|
|
@@ -359,9 +368,21 @@ interface GeoFilterBuilderLike {
|
|
|
359
368
|
};
|
|
360
369
|
}) => GeoFilterBuilderLike;
|
|
361
370
|
}
|
|
371
|
+
type ScoredDocument = GeoScoredDocument | SearchScoredDocument;
|
|
372
|
+
interface GeoScoredDocument {
|
|
373
|
+
distanceMeters: null | number;
|
|
374
|
+
document: Record<string, unknown>;
|
|
375
|
+
score?: never;
|
|
376
|
+
}
|
|
377
|
+
interface SearchScoredDocument {
|
|
378
|
+
distanceMeters?: never;
|
|
379
|
+
document: Record<string, unknown>;
|
|
380
|
+
score: number;
|
|
381
|
+
}
|
|
362
382
|
interface TableReaderLike {
|
|
363
383
|
[Symbol.asyncIterator]: () => AsyncIterator<Record<string, unknown>>;
|
|
364
384
|
collect: () => Promise<Record<string, unknown>[]>;
|
|
385
|
+
collectWithScores: () => Promise<ScoredDocument[]>;
|
|
365
386
|
filter: (predicate: (document: Record<string, unknown>) => boolean) => TableReaderLike;
|
|
366
387
|
first: () => Promise<Record<string, unknown> | null>;
|
|
367
388
|
order: (direction: "asc" | "desc") => TableReaderLike;
|
|
@@ -600,6 +621,7 @@ declare class ReactiveCache {
|
|
|
600
621
|
};
|
|
601
622
|
private dropRangeDeps;
|
|
602
623
|
private collectAndDrop;
|
|
624
|
+
private dropKeys;
|
|
603
625
|
private dropEntry;
|
|
604
626
|
private evict;
|
|
605
627
|
}
|
|
@@ -817,6 +839,7 @@ interface ShapeSubscriptionQuery {
|
|
|
817
839
|
sinceSeq?: number;
|
|
818
840
|
}
|
|
819
841
|
interface SubscriptionEnvelope {
|
|
842
|
+
caps?: string[];
|
|
820
843
|
clientId?: string;
|
|
821
844
|
context?: Record<string, unknown>;
|
|
822
845
|
data?: unknown;
|
|
@@ -827,6 +850,7 @@ interface SubscriptionEnvelope {
|
|
|
827
850
|
name: string;
|
|
828
851
|
};
|
|
829
852
|
sinceCheckpoint?: number;
|
|
853
|
+
sinceChunk?: number;
|
|
830
854
|
sinceEpoch?: string;
|
|
831
855
|
topic?: string;
|
|
832
856
|
type: "ack" | "connect" | "shape_subscribe" | "shape_unsubscribe" | "stream" | "subscribe" | "unsubscribe" | "whisper" | "whisper_subscribe" | "whisper_unsubscribe";
|
|
@@ -843,6 +867,7 @@ interface SocketAttachment {
|
|
|
843
867
|
context?: Record<string, unknown>;
|
|
844
868
|
expiresAt?: number;
|
|
845
869
|
identity?: Record<string, unknown>;
|
|
870
|
+
pageDeltas?: boolean;
|
|
846
871
|
shapes?: Record<string, ShapeSubscriptionQuery>;
|
|
847
872
|
subs: Record<string, SubscriptionQuery>;
|
|
848
873
|
userId?: string;
|
|
@@ -907,11 +932,21 @@ interface RankPageComputation {
|
|
|
907
932
|
}
|
|
908
933
|
declare const hydrateDocsById: (deps: RankPageDeps, tableName: string, ids: ReadonlyArray<string>) => Map<string, Record<string, unknown>>;
|
|
909
934
|
declare const computeRankPage: (deps: RankPageDeps, tableName: string, indexName: string, rankPageOptions: RankPageOptions) => RankPageComputation;
|
|
935
|
+
declare const SHAPE_POKE_CURSOR_TABLE = "__shape_poke_cursor";
|
|
936
|
+
declare const migrateShapePokeCursor: (sql: SqlExec) => void;
|
|
937
|
+
declare const readShapePokeCursor: (sql: SqlExec, connectionId: string, subId: string) => number | undefined;
|
|
938
|
+
declare const writeShapePokeCursor: (sql: SqlExec, connectionId: string, subId: string, cursor: number) => void;
|
|
939
|
+
declare const deleteShapePokeCursor: (sql: SqlExec, connectionId: string, subId: string) => void;
|
|
940
|
+
declare const deleteShapePokeCursorsForConnection: (sql: SqlExec, connectionId: string) => void;
|
|
910
941
|
declare const DATA_MIGRATION_STATE_TABLE = "__lunora_migrations";
|
|
911
942
|
type MigrationDirection = "down" | "up";
|
|
912
943
|
type MigrationStatus = "completed" | "failed" | "in_progress";
|
|
913
944
|
type DataMigrationDocument = Record<string, unknown>;
|
|
914
|
-
type
|
|
945
|
+
type DataMigrationReader = Pick<DatabaseWriterLike, "count" | "findFirst" | "findMany" | "get">;
|
|
946
|
+
interface DataMigrationContext {
|
|
947
|
+
db: DataMigrationReader;
|
|
948
|
+
}
|
|
949
|
+
type DataMigrationTransform = (document: DataMigrationDocument, context: DataMigrationContext) => DataMigrationDocument | Promise<DataMigrationDocument | undefined> | undefined;
|
|
915
950
|
interface DataMigrationLike {
|
|
916
951
|
readonly batchSize?: number;
|
|
917
952
|
readonly down?: DataMigrationTransform;
|
|
@@ -966,10 +1001,10 @@ interface DependencyTracker {
|
|
|
966
1001
|
declare const createDependencyTracker: () => DependencyTracker;
|
|
967
1002
|
declare const runSql: <Row = Record<string, unknown>>(sql: SqlExec, query: string, ...params: unknown[]) => SqlCursor<Row>;
|
|
968
1003
|
declare const runDrizzle: <Row = Record<string, unknown>>(exec: SqlExec, query: SQL) => SqlCursor<Row>;
|
|
1004
|
+
declare const quoteIdentifier: (name: string) => string;
|
|
969
1005
|
declare const serializeSqlValue: (value: unknown) => unknown;
|
|
970
1006
|
declare const DOC_COLUMN = "__doc__";
|
|
971
1007
|
declare const geoTableName: (table: string, indexName: string) => string;
|
|
972
|
-
declare const quoteIdentifier: (name: string) => string;
|
|
973
1008
|
declare const jsonPath: (field: string) => string;
|
|
974
1009
|
declare const jsonPathSql: (field: string) => SQL;
|
|
975
1010
|
declare const qualifiedJsonPath: (table: string, field: string) => string;
|
|
@@ -990,6 +1025,72 @@ interface RenderedSql {
|
|
|
990
1025
|
}
|
|
991
1026
|
declare const renderSql: (engine: SqlEngine, query: SQL) => RenderedSql;
|
|
992
1027
|
declare const param: (value: unknown) => SQL;
|
|
1028
|
+
declare const unionAll: (branches: ReadonlyArray<SQL>) => SQL;
|
|
1029
|
+
declare const sqliteInList: (reference: SQL, items: ReadonlyArray<unknown>, negated: boolean, budget?: number) => SQL;
|
|
1030
|
+
type DurableStreamStatus = "complete" | "error" | "running";
|
|
1031
|
+
interface DurableStreamRun {
|
|
1032
|
+
error?: string;
|
|
1033
|
+
errorCode?: string;
|
|
1034
|
+
lastSeq: number;
|
|
1035
|
+
startedAt: number;
|
|
1036
|
+
status: DurableStreamStatus;
|
|
1037
|
+
}
|
|
1038
|
+
interface DurableStreamChunk {
|
|
1039
|
+
dataJson: string;
|
|
1040
|
+
seq: number;
|
|
1041
|
+
}
|
|
1042
|
+
declare const migrateDurableStreams: (sql: SqlExec) => void;
|
|
1043
|
+
declare const readStreamRun: (sql: SqlExec, runKey: string) => DurableStreamRun | undefined;
|
|
1044
|
+
declare const claimStreamRun: (sql: SqlExec, runKey: string, startedAt: number, ttlMs: number) => boolean;
|
|
1045
|
+
declare const deleteStreamRun: (sql: SqlExec, runKey: string) => void;
|
|
1046
|
+
declare const appendStreamChunk: (sql: SqlExec, runKey: string, seq: number, dataJson: string) => void;
|
|
1047
|
+
declare const readStreamChunks: (sql: SqlExec, runKey: string, sinceSeq: number) => DurableStreamChunk[];
|
|
1048
|
+
declare const finishStreamRun: (sql: SqlExec, runKey: string, status: "complete" | "error", lastSeq: number, failure?: {
|
|
1049
|
+
code: string;
|
|
1050
|
+
message: string;
|
|
1051
|
+
}) => void;
|
|
1052
|
+
declare const trimStreamRuns: (sql: SqlExec, now: number) => void;
|
|
1053
|
+
declare const MAX_DURABLE_STREAM_CHUNKS = 50000;
|
|
1054
|
+
declare const MAX_DURABLE_STREAM_BYTES: number;
|
|
1055
|
+
interface DurableStreamSink {
|
|
1056
|
+
readonly chunk: (chunk: {
|
|
1057
|
+
data: unknown;
|
|
1058
|
+
seq: number;
|
|
1059
|
+
}) => boolean;
|
|
1060
|
+
readonly complete: () => void;
|
|
1061
|
+
readonly fail: (failure: {
|
|
1062
|
+
code: string;
|
|
1063
|
+
message: string;
|
|
1064
|
+
}) => void;
|
|
1065
|
+
}
|
|
1066
|
+
type DurableAttachDecision = "attach" | "interrupted" | "reclaim" | "replay-terminal";
|
|
1067
|
+
declare const decideDurableAttach: (run: DurableStreamRun | undefined, context: {
|
|
1068
|
+
live: boolean;
|
|
1069
|
+
resuming: boolean;
|
|
1070
|
+
}) => DurableAttachDecision;
|
|
1071
|
+
interface DurableStreamAttach {
|
|
1072
|
+
readonly iterator: (signal: AbortSignal) => AsyncIterable<unknown>;
|
|
1073
|
+
readonly runKey: string;
|
|
1074
|
+
readonly sinceChunk: number;
|
|
1075
|
+
readonly sink: DurableStreamSink;
|
|
1076
|
+
readonly ttlMs?: number;
|
|
1077
|
+
}
|
|
1078
|
+
declare class DurableStreamRunner {
|
|
1079
|
+
private lastTrimAt;
|
|
1080
|
+
private readonly runs;
|
|
1081
|
+
private readonly sql;
|
|
1082
|
+
private readonly waitUntil;
|
|
1083
|
+
constructor(dependencies: {
|
|
1084
|
+
sql: () => SqlExec;
|
|
1085
|
+
waitUntil?: (promise: Promise<unknown>) => void;
|
|
1086
|
+
});
|
|
1087
|
+
attach(request: DurableStreamAttach): Promise<void>;
|
|
1088
|
+
detach(runKey: string, sink: DurableStreamSink): void;
|
|
1089
|
+
isLive(runKey: string): boolean;
|
|
1090
|
+
private attachOrThrow;
|
|
1091
|
+
private produce;
|
|
1092
|
+
private trim;
|
|
1093
|
+
}
|
|
993
1094
|
interface ExternalSourceDiffResult {
|
|
994
1095
|
changes: CdcChange[];
|
|
995
1096
|
nextBaseline: Map<string, string>;
|
|
@@ -1103,6 +1204,7 @@ declare const ADMIN_FUNCTIONS: {
|
|
|
1103
1204
|
readonly getMetricSeries: "__lunora_admin__:getMetricSeries";
|
|
1104
1205
|
readonly listSubscriptions: "__lunora_admin__:listSubscriptions";
|
|
1105
1206
|
readonly listTableIndexes: "__lunora_admin__:listTableIndexes";
|
|
1207
|
+
readonly listTablesIndexes: "__lunora_admin__:listTablesIndexes";
|
|
1106
1208
|
readonly getLogs: "__lunora_admin__:getLogs";
|
|
1107
1209
|
readonly getMetrics: "__lunora_admin__:getMetrics";
|
|
1108
1210
|
readonly getPitrBookmark: "__lunora_admin__:getPitrBookmark";
|
|
@@ -1195,6 +1297,9 @@ interface TableIndexInfo {
|
|
|
1195
1297
|
interface TableIndexesResult {
|
|
1196
1298
|
indexes: TableIndexInfo[];
|
|
1197
1299
|
}
|
|
1300
|
+
interface TablesIndexesResult {
|
|
1301
|
+
indexesByTable: Record<string, TableIndexInfo[]>;
|
|
1302
|
+
}
|
|
1198
1303
|
interface ColumnMeta {
|
|
1199
1304
|
isStorage?: boolean;
|
|
1200
1305
|
name: string;
|
|
@@ -1225,12 +1330,13 @@ interface AdvisoriesResult {
|
|
|
1225
1330
|
advisories: AdvisoryFinding[];
|
|
1226
1331
|
}
|
|
1227
1332
|
interface AdvisorProcedure {
|
|
1228
|
-
|
|
1333
|
+
analyzableBody?: boolean;
|
|
1334
|
+
callsMail?: boolean;
|
|
1229
1335
|
emitsEvent?: boolean;
|
|
1230
1336
|
exempt?: boolean;
|
|
1231
1337
|
exemptReason?: string;
|
|
1232
1338
|
exportName: string;
|
|
1233
|
-
fanOut
|
|
1339
|
+
fanOut?: boolean;
|
|
1234
1340
|
file: string;
|
|
1235
1341
|
handlesErrors?: boolean;
|
|
1236
1342
|
hasEmailArg?: boolean;
|
|
@@ -1238,15 +1344,15 @@ interface AdvisorProcedure {
|
|
|
1238
1344
|
reachesOutbound?: boolean;
|
|
1239
1345
|
runsAiGeneration?: boolean;
|
|
1240
1346
|
throwsBareError?: boolean;
|
|
1241
|
-
unboundedAiGeneration
|
|
1347
|
+
unboundedAiGeneration?: boolean;
|
|
1242
1348
|
usesCaptcha: boolean;
|
|
1243
1349
|
usesEmailGate: boolean;
|
|
1244
|
-
usesInsertManyUnsafe
|
|
1350
|
+
usesInsertManyUnsafe?: boolean;
|
|
1245
1351
|
usesMask: boolean;
|
|
1246
1352
|
usesRateLimit: boolean;
|
|
1247
1353
|
usesRls: boolean;
|
|
1248
1354
|
visibility: "internal" | "public";
|
|
1249
|
-
writesUserTable
|
|
1355
|
+
writesUserTable?: boolean;
|
|
1250
1356
|
}
|
|
1251
1357
|
interface AdvisorProceduresResult {
|
|
1252
1358
|
procedures: AdvisorProcedure[];
|
|
@@ -1588,7 +1694,6 @@ declare const clearQueueMessages: (sql: SqlExec) => {
|
|
|
1588
1694
|
declare const encodePartitionKey: (partitionBy: ReadonlyArray<string>, source: Record<string, unknown>) => string;
|
|
1589
1695
|
declare const RANK_TIEBREAK = "__id__";
|
|
1590
1696
|
declare const sortColumnName: (i: number) => string;
|
|
1591
|
-
declare const matchesRankStaticWhere: (document: Record<string, unknown>, predicate: Record<string, unknown>) => boolean;
|
|
1592
1697
|
declare const resolveRankPartition: (index: RankIndexDefinitionLike, where: Record<string, unknown> | undefined) => Record<string, unknown> | undefined;
|
|
1593
1698
|
declare const rankTableName: (table: string, indexName: string) => string;
|
|
1594
1699
|
declare const rankKeyFromDocument: (index: RankIndexDefinitionLike, document_: Record<string, unknown>) => {
|
|
@@ -1596,6 +1701,7 @@ declare const rankKeyFromDocument: (index: RankIndexDefinitionLike, document_: R
|
|
|
1596
1701
|
rowId: string;
|
|
1597
1702
|
sortValues: unknown[];
|
|
1598
1703
|
};
|
|
1704
|
+
declare const matchesRankStaticWhere: (document: Record<string, unknown>, predicate: Record<string, unknown>) => boolean;
|
|
1599
1705
|
interface ReadFootprint {
|
|
1600
1706
|
onRead: (table: string, idOrScan?: string) => void;
|
|
1601
1707
|
onReadRange: (range: KeyRange) => void;
|
|
@@ -1637,6 +1743,7 @@ declare const containsRelationPredicate: (where: WhereInput, schema: ResolveCont
|
|
|
1637
1743
|
declare const assertFlatPredicate: (where: WhereInput | undefined, schema: ResolveContext["schema"], tableName: string, op: string) => void;
|
|
1638
1744
|
declare const resolveRelationPredicates: (where: WhereInput | undefined, options: ResolveRelationPredicatesOptions) => Promise<WhereInput | undefined>;
|
|
1639
1745
|
declare const assertShapeShardable: (effectiveWhere: WhereInput | undefined, schema: ResolveContext["schema"], table: string) => void;
|
|
1746
|
+
declare const relationHooks: (args: Pick<QueryArgs, "relationBaseWhere" | "relationMask">) => Pick<QueryArgs, "relationBaseWhere" | "relationMask">;
|
|
1640
1747
|
declare const fanOutScalarCounts: (counter: (tableName: string, where?: WhereInput) => Promise<number>, tableName: string, whereField: string, values: unknown[], policyWhere: WhereInput | undefined) => Promise<Map<unknown, number>>;
|
|
1641
1748
|
declare const distinctValues: (rows: Record<string, unknown>[], field: string) => unknown[];
|
|
1642
1749
|
declare const resolveWith: (options: ResolveWithOptions) => Promise<void>;
|
|
@@ -1741,15 +1848,10 @@ interface RelayShapePoke {
|
|
|
1741
1848
|
type: "relay_shape_poke";
|
|
1742
1849
|
}
|
|
1743
1850
|
type OwnerRelayFrame = RelayAttach | RelayDetach | RelayFrame | RelayShapePoke | RelayShapeSubscribe;
|
|
1744
|
-
|
|
1745
|
-
interface RelayStub {
|
|
1851
|
+
interface SiblingStub {
|
|
1746
1852
|
fetch: (url: string, init?: RequestInit) => Promise<Response>;
|
|
1747
1853
|
}
|
|
1748
|
-
|
|
1749
|
-
get: (id: unknown) => RelayStub;
|
|
1750
|
-
getByName?: (name: string) => RelayStub;
|
|
1751
|
-
idFromName: (name: string) => unknown;
|
|
1752
|
-
}
|
|
1854
|
+
declare const DEFAULT_MAX_RELAYS = 8;
|
|
1753
1855
|
interface RelayHost {
|
|
1754
1856
|
buildShapeDiff: (resolved: ResolvedShape, fromCursor: number, toCursor: number) => ShapeRowOp[];
|
|
1755
1857
|
computeOpLogShapeSeed: (shape: ShapeSubscriptionQuery, resolved: ResolvedShape) => {
|
|
@@ -1785,7 +1887,7 @@ declare abstract class RelayLink {
|
|
|
1785
1887
|
handleControl(request: Request): Promise<Response>;
|
|
1786
1888
|
maxRelays(): number;
|
|
1787
1889
|
protected canAddressSiblings(): boolean;
|
|
1788
|
-
protected
|
|
1890
|
+
protected siblingStub(targetName: string): SiblingStub | undefined;
|
|
1789
1891
|
protected postRelayMessage(targetName: string, message: OwnerRelayFrame): Promise<void>;
|
|
1790
1892
|
protected requestRelayMessage(targetName: string, message: OwnerRelayFrame): Promise<Response | undefined>;
|
|
1791
1893
|
abstract forwardWhisper(topic: string, frame: string): Promise<void>;
|
|
@@ -1826,6 +1928,7 @@ declare class OwnerRelay extends RelayLink {
|
|
|
1826
1928
|
protected onWhisperFrame(message: RelayFrame): Promise<void>;
|
|
1827
1929
|
protected onShapeSubscribe(message: RelayShapeSubscribe): RelayShapeSeed;
|
|
1828
1930
|
protected onShapePoke(): number;
|
|
1931
|
+
private buildShapePoke;
|
|
1829
1932
|
private multicastShapePokes;
|
|
1830
1933
|
private proxyShapePokes;
|
|
1831
1934
|
private buildShapeSeedFrames;
|
|
@@ -1859,6 +1962,61 @@ declare class RelayMember extends RelayLink {
|
|
|
1859
1962
|
private deliverShapePoke;
|
|
1860
1963
|
}
|
|
1861
1964
|
declare const createRelayLink: (host: RelayHost) => OwnerRelay | RelayMember | undefined;
|
|
1965
|
+
declare const REGION_HINTS: readonly ["wnam", "enam", "sam", "weur", "eeur", "apac", "apac-ne", "apac-se", "oc", "afr", "me"];
|
|
1966
|
+
type RegionHint = (typeof REGION_HINTS)[number];
|
|
1967
|
+
type ReplicaReadiness = "fresh" | "stale" | "unavailable";
|
|
1968
|
+
interface ShardSiblingHost {
|
|
1969
|
+
doName: () => string | undefined;
|
|
1970
|
+
env: () => unknown;
|
|
1971
|
+
shardBinding: () => string | undefined;
|
|
1972
|
+
sql: () => SqlExec;
|
|
1973
|
+
}
|
|
1974
|
+
interface ReplicaOwnerHost extends ShardSiblingHost {
|
|
1975
|
+
exportRows: () => Promise<ExportRow[]>;
|
|
1976
|
+
ownerCursor: () => number | undefined;
|
|
1977
|
+
ownerEpoch: () => string | undefined;
|
|
1978
|
+
ownerFloor: () => number | undefined;
|
|
1979
|
+
readChanges: (sinceSeq: number, limit: number) => {
|
|
1980
|
+
changes: CdcChange[];
|
|
1981
|
+
cursor: number;
|
|
1982
|
+
};
|
|
1983
|
+
rowCount: () => number;
|
|
1984
|
+
}
|
|
1985
|
+
interface ReplicaFollowerHost extends ShardSiblingHost {
|
|
1986
|
+
applyChanges: (changes: ReadonlyArray<CdcChange>) => Promise<number>;
|
|
1987
|
+
importRows: (rows: ReadonlyArray<ExportRow>) => Promise<{
|
|
1988
|
+
errors: ReadonlyArray<unknown>;
|
|
1989
|
+
}>;
|
|
1990
|
+
}
|
|
1991
|
+
declare const handleReplicaControl: (host: ReplicaOwnerHost, request: Request) => Promise<Response>;
|
|
1992
|
+
declare class ShardReplica {
|
|
1993
|
+
private readonly host;
|
|
1994
|
+
readonly ownerKey: string;
|
|
1995
|
+
readonly region: RegionHint;
|
|
1996
|
+
private divergent;
|
|
1997
|
+
private inFlight;
|
|
1998
|
+
constructor(host: ReplicaFollowerHost, ownerKey: string, region: RegionHint);
|
|
1999
|
+
ensureFresh(minSeq?: number): Promise<ReplicaReadiness>;
|
|
2000
|
+
appliedSeq(): number;
|
|
2001
|
+
isDivergent(): boolean;
|
|
2002
|
+
private advance;
|
|
2003
|
+
private isCaughtUp;
|
|
2004
|
+
private catchUp;
|
|
2005
|
+
private applyPage;
|
|
2006
|
+
private hasDiverged;
|
|
2007
|
+
private bootstrap;
|
|
2008
|
+
private isFreshEnough;
|
|
2009
|
+
private pull;
|
|
2010
|
+
private request;
|
|
2011
|
+
}
|
|
2012
|
+
declare const createReplicaLink: (host: ReplicaFollowerHost) => ShardReplica | undefined;
|
|
2013
|
+
declare const gateReplicaDispatch: (replica: ShardReplica, request: Request, functionPath: string) => Promise<Response | undefined>;
|
|
2014
|
+
declare const REPROJECTION_MIGRATION_PREFIX = "__lunora_reproject__";
|
|
2015
|
+
declare const reprojectionMigrationId: (table: string) => string;
|
|
2016
|
+
declare const reprojectableFields: (definition: TableDefinitionLike) => string[];
|
|
2017
|
+
declare const reprojectionTables: (schema: SchemaLike) => string[];
|
|
2018
|
+
declare const countLegacyRows: (sql: SqlExec, table: string, fields: ReadonlyArray<string>) => number;
|
|
2019
|
+
declare const buildReprojectionMigration: (id: string, schema: SchemaLike, sql: SqlExec) => DataMigrationLike | undefined;
|
|
1862
2020
|
declare const RLS_UNWRAP_SYMBOL: symbol;
|
|
1863
2021
|
declare class RlsRequiredError extends LunoraError {
|
|
1864
2022
|
readonly table: string;
|
|
@@ -1874,7 +2032,8 @@ interface GuardableSchema {
|
|
|
1874
2032
|
}>;
|
|
1875
2033
|
}
|
|
1876
2034
|
type TableOfId = (id: string, expectedTable?: string) => Promise<string | undefined> | string | undefined;
|
|
1877
|
-
|
|
2035
|
+
type TablesOfIds = (ids: ReadonlyArray<string>, expectedTable?: string) => Promise<ReadonlyMap<string, string>> | ReadonlyMap<string, string>;
|
|
2036
|
+
declare const guardWriter: <W>(raw: W, schema: GuardableSchema, tableOfId: TableOfId, tablesOfIds?: TablesOfIds) => W;
|
|
1878
2037
|
declare const SCHEMA_HISTORY_MAX_VERSIONS = 50;
|
|
1879
2038
|
interface SchemaVersionRow {
|
|
1880
2039
|
appliedAt: number;
|
|
@@ -1936,7 +2095,17 @@ interface DrainableSink {
|
|
|
1936
2095
|
readonly bufferedAmount?: unknown;
|
|
1937
2096
|
}
|
|
1938
2097
|
declare const trySendFrame: (ws: FrameSink, frame: string) => boolean;
|
|
1939
|
-
|
|
2098
|
+
interface SubscriptionFrameInput {
|
|
2099
|
+
cursorSuffix: string;
|
|
2100
|
+
lastMutationId?: number;
|
|
2101
|
+
nextResult: unknown;
|
|
2102
|
+
pageDeltas?: boolean;
|
|
2103
|
+
previousJson?: string;
|
|
2104
|
+
snapshotJson: string;
|
|
2105
|
+
subId: string;
|
|
2106
|
+
table: string;
|
|
2107
|
+
}
|
|
2108
|
+
declare const subscriptionFrames: (input: SubscriptionFrameInput) => string[];
|
|
1940
2109
|
declare const awaitWsDrain: (ws: DrainableSink) => Promise<void>;
|
|
1941
2110
|
interface SubscriptionReadFootprint {
|
|
1942
2111
|
ranges?: Map<string, KeyRange[]>;
|
|
@@ -1967,10 +2136,12 @@ declare const selectExpiredIds: (sql: SqlExec, spec: TtlSweepSpec, now: number,
|
|
|
1967
2136
|
type FieldRefSql = (field: string) => SQL;
|
|
1968
2137
|
type SerializeValue = (value: unknown) => unknown;
|
|
1969
2138
|
interface WhereSqlStrategy {
|
|
2139
|
+
containsExpr?: (reference: SQL, term: SQL) => SQL;
|
|
1970
2140
|
fieldRef: FieldRefSql;
|
|
1971
|
-
|
|
2141
|
+
inList?: (reference: SQL, items: ReadonlyArray<unknown>, negated: boolean, budget?: number) => SQL;
|
|
1972
2142
|
relationExists?: (request: unknown) => SQL;
|
|
1973
2143
|
serialize: SerializeValue;
|
|
1974
2144
|
}
|
|
2145
|
+
declare const literalInList: (reference: SQL, items: ReadonlyArray<unknown>, negated: boolean) => SQL;
|
|
1975
2146
|
declare const compileWhereSql: (where: WhereInput | undefined, strategy: WhereSqlStrategy) => SQL | undefined;
|
|
1976
|
-
export { ADMIN_FUNCTIONS, ADMIN_FUNCTION_PREFIX, AGGREGATE_SQL_FUNCTION, AGG_COUNT, AGG_KEY, AGG_VALUE, AUDIT_LOG_TABLE, type AdvisorProcedure, type AdvisorProceduresResult, type AdvisoriesResult, type AdvisoryFinding, type AggregateIndexDefinitionLike, type AggregateOp, type AggregateOptions, type AggregateResult, type AggregateTally, type AppendAuditEntry, type ApplyOnDeleteOptions$1 as ApplyOnDeleteOptions, type AuditEntry, type AuditLogResult, type BroadcastDelta, CDC_LOG_TABLE, CDC_META_TABLE, CLIENT_WATERMARK_TABLE, type CacheEntry, type CapturedMailRow, type CdcChange, type ChangedKeys, type Clock, type ColumnMeta, type ColumnMetaLike, type CompanionSync, type CompanionSyncDeps, ConflictError, type ConflictKind, type CountArgs, CountRlsUnsupportedError, type CreateWorkflowInstanceResult, type CtxDbOptions, DATA_MIGRATION_STATE_TABLE, DEFAULT_FANOUT_TOPIC_LIMIT, DEFAULT_MAX_RELATION_KEYS, DEFAULT_MAX_RELAYS, DEFAULT_PROMOTION_THRESHOLDS, DEFAULT_TRANSACTION_LIMITS, DOC_COLUMN, type DataMigrationDocument, type DataMigrationLike, type DataMigrationTransform, type DatabaseWriterLike, type DependencyTracker, type DeployInfo, type ExportRow, type ExportShardAdminArgs, type ExportShardArgs, type ExternalSourceDiffResult, type ExternalSourceLike, FLAGS_FUNCTION_PREFIX, type FacetColumnOptions, type FacetColumnResult, type FacetValue, type FanoutMetricsResult, type FanoutPathCounters, type FanoutTopicStat, type FieldOperators, type FilterClause, type FilterOperator, type FlagEvaluation, type FlagsResult, type FunctionCallStat, type FunctionScanAttribution, type FunctionStatsResult, GEO_DEFAULT_PRECISION, GLOBAL_SHAPE_SNAPSHOT_TABLE, type GeoBoundingBox, type GeoFilterBuilderLike, type GeoIndexDefinitionLike, type GeoPoint, type GroupByEntry, type GroupByOptions, type GuardableSchema$1 as GuardableSchema, IDEMPOTENCY_TABLE, type IdGenerator, type IdempotentRecord, type ImportError, type ImportShardAdminArgs, type ImportShardArgs, type ImportShardResult, type IncrementalMaterializeResult, type IndexDefinitionLike, type IndexKeyEntry, type IndexRangeBuilderLike, type KeyRange, type LifecycleDispatchInfo, type LifecycleEvent, MAIL_RETENTION, MAIL_TABLE, MAX_PAGE_SIZE, MAX_SQL_ROWS, type MaskColumnMetadata, type MaskPoliciesResult, type MaterializeResult, type MigrationDirection, type MigrationRunResult, type MigrationStatus, type MigrationStatusRow, type MutationDelta, type NestedWith, NotFoundError, NotUniqueError, type OnDeleteActionLike, type OrderByClause, type OrderByInput, type OrderKey, OwnerRelay, type OwnerRelayFrame, type PaginationOptions, type PitrBookmarkResult, type PitrRestoreArgs, type PitrRestoreResult, type PitrStorage, type PokeFrameMeta, type PromotionState, type PromotionThresholds, QUEUE_TABLE, type QueryArgs, type QueryPage, type QueueMessageOutcome, type QueueMessageRow, type QueueMetadata, type QueuesResult, RANK_TIEBREAK, RELATION_EXISTS_KEY, RELATION_FUNCTION_PREFIX, RLS_UNWRAP_SYMBOL, type RankBeforeOptions, type RankBeforeResult, type RankDirection, type RankIndexDefinitionLike, type RankOptions, type RankPage, type RankPageComputation, type RankPageDeps, type RankPageOptions, type RankPageRow, type RankPageRowKey, type RankResult, type RankSortKeyLike, ReactiveCache, type ReactiveCacheOptions, type ReadFootprint, type ReadHook, type ReadTablePageOptions, type RecordMailInput, type RecordQueueMessageInput, type RelationDefinitionLike, type RelationExistsMarker, type RelayAttach, type RelayDetach, type RelayFrame, type RelayHost, RelayMember, type RelayShapePoke, type RelayShapeSeed, type RelayShapeSubscribe, type RenderedSql, type ResolveRelationPredicatesOptions, type ResolveWithOptions, type ResolveWithResult, type ResolvedShape, type RestrictableQueryOptions, type RlsPoliciesResult, type RlsPolicyMetadata, RlsRequiredError, type RlsRoleMetadata, type RpcRequest, type RunDataMigrationOptions, type RunTriggersOptions, SCAN_DEP, SCHEMA_HISTORY_MAX_VERSIONS, SEARCH_STATE_TABLE, type SchedulableWorkflowReferenceLike, type ScheduledFunctionDoc, type SchedulerLike, type SchemaLike, type SearchFilterBuilderLike, type SearchIndexDefinitionLike, type SelectMatchingIdsOptions, type ServerDefaultContextLike, type SettingEntry, type SettingKind, type SettingsResult, type ShapePokePart, type ShapeRow, type ShapeRowOp, type ShapeSubscriptionQuery, type ShardRankPageResult, ShardRunner, type ShardRunnerOptions, type ShardSocketLike, type SocketAttachment, type SortDirection, type SourceClientLike, type SourceCursorLike, type SourceRefresh, type SqlConsoleResult, type SqlCursor, type SqlEngine, type SqlExec, type SqlLintResult, type StorageMetadata, type StorageReference, type StorageReferenceResult, type StorageRuleMetadata, type StorageRulesResult, type StudioFeaturesResult, type SubscriptionConnection, type SubscriptionEnvelope, type SubscriptionIdentity, type SubscriptionInfo, type SubscriptionQuery, type SubscriptionReadFootprint, type SubscriptionsResult, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemReaderOptions, type SystemReaderSchedulerLike, type SystemReaderStorageLike, type SystemTableName, type TableColumnsResult, type TableDefinitionLike, type TableIndexInfo, type TableIndexesResult, type TableInfo, type TablePage, type TableReaderLike, type TablesColumnsResult, type TransactionHeadroom, TransactionHeadroomTracker, type TransactionLimits, type TransactionSqlLike, type TriggerContextLike, type TriggerDefinitionLike, type TriggerEventLike, type TriggerOpLike, type TriggerTimingLike, type TtlSweepSpec, type ValidatorLike, type WhereInput, type WhereSqlStrategy, type WithInput, type WorkflowInstanceState, type WorkflowInstanceStatusResult, type WorkflowMetadata, type WorkflowsResult, type WriteEvent, type WriteHook, advanceClientWatermark, aggUpsertSql, aggregateSqlFunction, aggregateTableName, appendAuditEntry, appendCdcChange, applyCdcChanges, applyOnDelete, applySelect, armRestore, assertFlatPredicate, assertReadonly, assertShapeShardable, assertValidClientId, awaitWsDrain, backfillAggregateIndexes, backfillRankIndexes, backfillSearchIndexes, backfillSearchIndexesForTable, boundingBoxCenter, boundingBoxGeohashes, buildIndexRange, buildPokeFrames, buildSeekBeforeWhere, buildSeekWhere, buildSettings, bumpCdcEpoch, clampPromotionThresholds, clearCapturedMail, clearQueueMessages, coerceAggregateNumber, compileWhereSql, computeRankPage, containsRelationPredicate, coveringGeohashes, createCompanionSync, createDependencyTracker, createFanoutCounters, createIndexSql, createReadFootprint, createRelayLink, createShardCtxDb, createSystemReader, decodeCursor, deleteGlobalShapeSnapshot, deleteGlobalShapeSnapshotsForConnection, depKey, diffExternalSource, diffGlobalMembership, distinctValues, encodeAggregateKey, encodeCursor, encodeGeohash, encodePartitionKey, encodeRowsPatch, ensureAuditTable, ensureMailTable, exportShardRows, exportShardTable, facetColumn, fanOutScalarCounts, findStorageReferences, foldAggregateTally, geoTableName, guardWriter, hasTrigger, haversineMeters, hydrateDocsById, importShardRows, indexKeysForRow, isDevEnvironment, isFtsAvailable, isLossyBody, isRelationPredicate, isSoftDeleted, isSourceDue, jsonPath, jsonPathSql, keysTouchRanges, liftSourceId, lintReadonlySql, listTables, matchesRankStaticWhere, matchesStaticWhere, materializeExternalRows, materializeExternalRowsIncremental, mergeChangedKeys, mergeWhere, migrateCdcLog, migrateCdcMeta, migrateClientWatermark, migrateGlobalShapeSnapshot, migrateIdempotency, migrateSearchState, minCdcSeq, nextPromotionState, normalizeCountArgument, normalizeIdStructurally, normalizeOrderKeys, normalizeSourceDocument, normalizeSourceValue, param, parseExportShardArgs, parseImportShardArgs, planAggregateLookup, pointInBoundingBox, projectColumns, pullExternalSourceIncrementalTick, pullExternalSourceTick, qualifiedJsonPath, qualifiedJsonPathSql, quoteIdentifier, rankKeyFromDocument as rankKeyFromDoc, rankTableName, reactiveCacheKey, readAggregateValue, readAuditLog, readBookmark, readCapturedMail, readCdcChanges, readCdcCursor, readCdcEpoch, readClientWatermark, readExternalSourceBaseline, readGlobalShapeSnapshot, readIdempotent, readMigrationStatus, readQueueMessageById, readQueueMessages, readSchemaHistory, readSchemaVersion, readSearchBackfillState, readTablePage, recordCapturedMail, recordChangedKeys, recordFanoutPass, recordQueueMessages, recordSchemaVersion, relayCountFor, renderSql, resolveRankPartition, resolveRelationPredicates, resolveWith, rowToDocument, runDataMigration, runDrizzle, runExternalSourceTick, runReadonlySql, runRowValidators, runShardMigrations, runSocketPool, runSql, runTriggers, selectExpiredIds, selectExportTables, selectIndexForAggregate, selectIndexForCount, selectIndexForGroupBy, selectMatchingIds, selectShapeMemberIds, selectShapeRows, sendDeltaFrames, serializeSqlValue, shapeRoutingKey, softDeleteScope, sortColumnName, stableStringify, stableWireKey, subscriptionListDeltas, summarizeFanoutTopics, summarizeSubscriptions, tableColumns, tableFromDepKey, throwingScheduler, trimCdcChanges, trimIdempotent, tryRowToDocument, trySendFrame, validateImportRow, writeGlobalShapeSnapshot, writeIdempotent, writeSearchBackfillState, writeTouchesMemo };
|
|
2147
|
+
export { ADMIN_FUNCTIONS, ADMIN_FUNCTION_PREFIX, AGGREGATE_SQL_FUNCTION, AGG_COUNT, AGG_KEY, AGG_VALUE, AUDIT_LOG_TABLE, type AdvisorProcedure, type AdvisorProceduresResult, type AdvisoriesResult, type AdvisoryFinding, type AggregateIndexDefinitionLike, type AggregateOp, type AggregateOptions, type AggregateResult, type AggregateTally, type AppendAuditEntry, type ApplyOnDeleteOptions$1 as ApplyOnDeleteOptions, type AuditEntry, type AuditLogResult, type BroadcastDelta, CDC_LOG_TABLE, CDC_META_TABLE, CLIENT_WATERMARK_TABLE, type CacheEntry, type CapturedMailRow, type CdcChange, type ChangedKeys, type Clock, type ColumnMeta, type ColumnMetaLike, type CompanionSync, type CompanionSyncDeps, ConflictError, type ConflictKind, type CountArgs, CountRlsUnsupportedError, type CreateWorkflowInstanceResult, type CrossShardReadArgs, type CtxDbOptions, DATA_MIGRATION_STATE_TABLE, DEFAULT_FANOUT_TOPIC_LIMIT, DEFAULT_MAX_RELATION_KEYS, DEFAULT_MAX_RELAYS, DEFAULT_PROMOTION_THRESHOLDS, DEFAULT_TRANSACTION_LIMITS, DOC_COLUMN, type DataMigrationDocument, type DataMigrationLike, type DataMigrationTransform, type DatabaseWriterLike, type DependencyTracker, type DeployInfo, type DurableAttachDecision, type DurableStreamAttach, type DurableStreamRun, DurableStreamRunner, type DurableStreamSink, type ExportRow, type ExportShardAdminArgs, type ExportShardArgs, type ExternalSourceDiffResult, type ExternalSourceLike, FLAGS_FUNCTION_PREFIX, type FacetColumnOptions, type FacetColumnResult, type FacetValue, type FanoutMetricsResult, type FanoutPathCounters, type FanoutTopicStat, type FieldOperators, type FilterClause, type FilterOperator, type FlagEvaluation, type FlagsResult, type FunctionCallStat, type FunctionScanAttribution, type FunctionStatsResult, GEO_DEFAULT_PRECISION, GLOBAL_SHAPE_SNAPSHOT_TABLE, type GeoBoundingBox, type GeoFilterBuilderLike, type GeoIndexDefinitionLike, type GeoPoint, type GeoScoredDocument, type GroupByEntry, type GroupByOptions, type GuardableSchema$1 as GuardableSchema, IDEMPOTENCY_TABLE, type IdGenerator, type IdempotentRecord, type ImportError, type ImportShardAdminArgs, type ImportShardArgs, type ImportShardResult, type IncrementalMaterializeResult, type IndexDefinitionLike, type IndexKeyEntry, type IndexRangeBuilderLike, type KeyRange, type LifecycleDispatchInfo, type LifecycleEvent, MAIL_RETENTION, MAIL_TABLE, MAX_DURABLE_STREAM_BYTES, MAX_DURABLE_STREAM_CHUNKS, MAX_PAGE_SIZE, MAX_SQL_ROWS, type MaskColumnMetadata, type MaskPoliciesResult, type MaterializeResult, type MigrationDirection, type MigrationRunResult, type MigrationStatus, type MigrationStatusRow, type MutationDelta, type NestedWith, NotFoundError, NotUniqueError, type OnDeleteActionLike, type OrderByClause, type OrderByInput, type OrderKey, OwnerRelay, type OwnerRelayFrame, type PaginationOptions, type PitrBookmarkResult, type PitrRestoreArgs, type PitrRestoreResult, type PitrStorage, type PokeFrameMeta, type PromotionState, type PromotionThresholds, QUEUE_TABLE, type QueryArgs, type QueryPage, type QueueMessageOutcome, type QueueMessageRow, type QueueMetadata, type QueuesResult, RANK_TIEBREAK, RELATION_EXISTS_KEY, RELATION_FUNCTION_PREFIX, REPROJECTION_MIGRATION_PREFIX, RLS_UNWRAP_SYMBOL, type RankBeforeOptions, type RankBeforeResult, type RankDirection, type RankIndexDefinitionLike, type RankOptions, type RankPage, type RankPageComputation, type RankPageDeps, type RankPageOptions, type RankPageRow, type RankPageRowKey, type RankResult, type RankSortKeyLike, ReactiveCache, type ReactiveCacheOptions, type ReadFootprint, type ReadHook, type ReadTablePageOptions, type RecordMailInput, type RecordQueueMessageInput, type RelationDefinitionLike, type RelationExistsMarker, type RelayAttach, type RelayDetach, type RelayFrame, type RelayHost, RelayMember, type RelayShapePoke, type RelayShapeSeed, type RelayShapeSubscribe, type RenderedSql, type ReplicaFollowerHost, type ReplicaOwnerHost, type ReplicaReadiness, type ResolveRelationPredicatesOptions, type ResolveWithOptions, type ResolveWithResult, type ResolvedShape, type RestrictableQueryOptions, type RlsPoliciesResult, type RlsPolicyMetadata, RlsRequiredError, type RlsRoleMetadata, type RpcRequest, type RunDataMigrationOptions, type RunTriggersOptions, SCAN_DEP, SCHEMA_HISTORY_MAX_VERSIONS, SEARCH_STATE_TABLE, SHAPE_POKE_CURSOR_TABLE, type SchedulableWorkflowReferenceLike, type ScheduledFunctionDoc, type SchedulerLike, type SchemaLike, type ScoredDocument, type SearchFilterBuilderLike, type SearchIndexDefinitionLike, type SearchScoredDocument, type SelectMatchingIdsOptions, type ServerDefaultContextLike, type SettingEntry, type SettingKind, type SettingsResult, type ShapePokePart, type ShapeRow, type ShapeRowOp, type ShapeSubscriptionQuery, type ShardRankPageResult, ShardRunner, type ShardRunnerOptions, type ShardSiblingHost, type ShardSocketLike, type SocketAttachment, type SortDirection, type SourceClientLike, type SourceCursorLike, type SourceRefresh, type SqlConsoleResult, type SqlCursor, type SqlEngine, type SqlExec, type SqlLintResult, type StorageMetadata, type StorageReference, type StorageReferenceResult, type StorageRuleMetadata, type StorageRulesResult, type StudioFeaturesResult, type SubscriptionConnection, type SubscriptionEnvelope, type SubscriptionIdentity, type SubscriptionInfo, type SubscriptionQuery, type SubscriptionReadFootprint, type SubscriptionsResult, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemReaderOptions, type SystemReaderSchedulerLike, type SystemReaderStorageLike, type SystemTableName, type TableColumnsResult, type TableDefinitionLike, type TableIndexInfo, type TableIndexesResult, type TableInfo, type TablePage, type TableReaderLike, type TablesColumnsResult, type TablesIndexesResult, type TransactionHeadroom, TransactionHeadroomTracker, type TransactionLimits, type TransactionSqlLike, type TriggerContextLike, type TriggerDefinitionLike, type TriggerEventLike, type TriggerOpLike, type TriggerTimingLike, type TtlSweepSpec, type ValidatorLike, type WhereInput, type WhereSqlStrategy, type WithInput, type WorkflowInstanceState, type WorkflowInstanceStatusResult, type WorkflowMetadata, type WorkflowsResult, type WriteEvent, type WriteHook, advanceClientWatermark, aggUpsertSql, aggregateSqlFunction, aggregateTableName, appendAuditEntry, appendCdcChange, appendStreamChunk, applyCdcChanges, applyOnDelete, applySelect, armRestore, assertFlatPredicate, assertReadonly, assertShapeShardable, assertValidClientId, awaitWsDrain, backfillAggregateIndexes, backfillRankIndexes, backfillSearchIndexes, backfillSearchIndexesForTable, boundingBoxCenter, boundingBoxGeohashes, buildIndexRange, buildPokeFrames, buildReprojectionMigration, buildSeekBeforeWhere, buildSeekWhere, buildSettings, bumpCdcEpoch, claimStreamRun, clampPromotionThresholds, clearCapturedMail, clearQueueMessages, coerceAggregateNumber, compileWhereSql, computeRankPage, containsRelationPredicate, countLegacyRows, coveringGeohashes, createCompanionSync, createDependencyTracker, createFanoutCounters, createIndexSql, createReadFootprint, createRelayLink, createReplicaLink, createShardCtxDb, createSystemReader, decideDurableAttach, decodeCursor, deleteGlobalShapeSnapshot, deleteGlobalShapeSnapshotsForConnection, deleteShapePokeCursor, deleteShapePokeCursorsForConnection, deleteStreamRun, depKey, diffExternalSource, diffGlobalMembership, distinctValues, encodeAggregateKey, encodeCursor, encodeGeohash, encodePartitionKey, encodeRowsPatch, ensureAuditTable, ensureMailTable, exportShardRows, exportShardTable, facetColumn, fanOutScalarCounts, findStorageReferences, finishStreamRun, foldAggregateTally, gateReplicaDispatch, geoTableName, guardWriter, handleReplicaControl, hasTrigger, haversineMeters, hydrateDocsById, importShardRows, indexKeysForRow, isDevEnvironment, isFtsAvailable, isLossyBody, isRelationPredicate, isSoftDeleted, isSourceDue, jsonPath, jsonPathSql, keysTouchRanges, liftSourceId, lintReadonlySql, listTables, literalInList, matchesRankStaticWhere, matchesStaticWhere, materializeExternalRows, materializeExternalRowsIncremental, mergeChangedKeys, mergeWhere, migrateCdcLog, migrateCdcMeta, migrateClientWatermark, migrateDurableStreams, migrateGlobalShapeSnapshot, migrateIdempotency, migrateSearchState, migrateShapePokeCursor, minCdcSeq, nextPromotionState, normalizeCountArgument, normalizeIdStructurally, normalizeOrderKeys, normalizeSourceDocument, normalizeSourceValue, param, parseExportShardArgs, parseImportShardArgs, planAggregateLookup, pointInBoundingBox, projectColumns, pullExternalSourceIncrementalTick, pullExternalSourceTick, qualifiedJsonPath, qualifiedJsonPathSql, quoteIdentifier, rankKeyFromDocument as rankKeyFromDoc, rankTableName, reactiveCacheKey, readAggregateValue, readAuditLog, readBookmark, readCapturedMail, readCdcChanges, readCdcCursor, readCdcEpoch, readClientWatermark, readExternalSourceBaseline, readGlobalShapeSnapshot, readIdempotent, readMigrationStatus, readQueueMessageById, readQueueMessages, readSchemaHistory, readSchemaVersion, readSearchBackfillState, readShapePokeCursor, readStreamChunks, readStreamRun, readTablePage, recordCapturedMail, recordChangedKeys, recordFanoutPass, recordQueueMessages, recordSchemaVersion, relationHooks, relayCountFor, renderSql, reprojectableFields, reprojectionMigrationId, reprojectionTables, resolveRankPartition, resolveRelationPredicates, resolveWith, rowToDocument, runDataMigration, runDrizzle, runExternalSourceTick, runReadonlySql, runRowValidators, runShardMigrations, runSocketPool, runSql, runTriggers, selectExpiredIds, selectExportTables, selectIndexForAggregate, selectIndexForCount, selectIndexForGroupBy, selectMatchingIds, selectShapeMemberIds, selectShapeRows, serializeSqlValue, shapeRoutingKey, softDeleteScope, sortColumnName, sqliteInList, stableStringify, stableWireKey, subscriptionFrames, subscriptionListDeltas, summarizeFanoutTopics, summarizeSubscriptions, tableColumns, tableFromDepKey, throwingScheduler, trimCdcChanges, trimIdempotent, trimStreamRuns, tryRowToDocument, trySendFrame, unionAll, validateImportRow, writeGlobalShapeSnapshot, writeIdempotent, writeSearchBackfillState, writeShapePokeCursor, writeTouchesMemo };
|