@minnowdb/core 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/block-format/block.d.ts +32 -13
- package/dist/block-format/block.js +179 -55
- package/dist/block-format/checksum.d.ts +2 -1
- package/dist/block-format/checksum.js +5 -2
- package/dist/block-format/codecs.d.ts +7 -2
- package/dist/block-format/codecs.js +53 -12
- package/dist/block-format/column.d.ts +3 -2
- package/dist/block-format/column.js +96 -30
- package/dist/block-format/index.d.ts +2 -2
- package/dist/block-format/index.js +2 -2
- package/dist/block-format/physical.d.ts +8 -2
- package/dist/block-format/physical.js +14 -6
- package/dist/block-format/types.d.ts +7 -3
- package/dist/block-format/types.js +0 -1
- package/dist/block-format/unicode.d.ts +11 -0
- package/dist/block-format/unicode.js +46 -0
- package/dist/date-value.d.ts +15 -0
- package/dist/date-value.js +64 -0
- package/dist/engine/artifact-cache.d.ts +0 -1
- package/dist/engine/artifact-cache.js +0 -1
- package/dist/engine/batch.d.ts +5 -2
- package/dist/engine/batch.js +0 -1
- package/dist/engine/buffered-writer.d.ts +2 -1
- package/dist/engine/buffered-writer.js +34 -9
- package/dist/engine/cache-limits.d.ts +25 -0
- package/dist/engine/cache-limits.js +25 -0
- package/dist/engine/catalog.d.ts +5 -6
- package/dist/engine/catalog.js +5 -5
- package/dist/engine/client.d.ts +27 -7
- package/dist/engine/client.js +197 -31
- package/dist/engine/database.d.ts +161 -38
- package/dist/engine/database.js +4320 -1523
- package/dist/engine/defaults.d.ts +0 -1
- package/dist/engine/defaults.js +2 -4
- package/dist/engine/errors.d.ts +19 -1
- package/dist/engine/errors.js +32 -2
- package/dist/engine/fts.d.ts +0 -6
- package/dist/engine/fts.js +39 -14
- package/dist/engine/group-index.d.ts +0 -1
- package/dist/engine/group-index.js +6 -11
- package/dist/engine/index.d.ts +16 -11
- package/dist/engine/index.js +12 -10
- package/dist/engine/join-index.d.ts +0 -1
- package/dist/engine/join-index.js +2 -2
- package/dist/engine/keyed-live.d.ts +57 -0
- package/dist/engine/keyed-live.js +226 -0
- package/dist/engine/live-api.d.ts +4 -0
- package/dist/engine/live-api.js +4 -0
- package/dist/engine/live.d.ts +43 -26
- package/dist/engine/live.js +499 -129
- package/dist/engine/memory.d.ts +2 -1
- package/dist/engine/memory.js +3 -2
- package/dist/engine/optimizer.d.ts +0 -1
- package/dist/engine/optimizer.js +4 -4
- package/dist/engine/query-api.d.ts +3 -0
- package/dist/engine/query-api.js +3 -0
- package/dist/engine/query-cache.d.ts +0 -1
- package/dist/engine/query-cache.js +4 -4
- package/dist/engine/query.d.ts +4 -7
- package/dist/engine/query.js +348 -155
- package/dist/engine/result-wire.d.ts +0 -1
- package/dist/engine/result-wire.js +2 -2
- package/dist/engine/schema-wire.d.ts +1 -2
- package/dist/engine/schema-wire.js +0 -1
- package/dist/engine/schema.d.ts +3 -8
- package/dist/engine/schema.js +41 -24
- package/dist/engine/sort-keys.d.ts +0 -1
- package/dist/engine/sort-keys.js +2 -2
- package/dist/engine/sql-domains.d.ts +6 -1
- package/dist/engine/sql-domains.js +209 -45
- package/dist/engine/sql-driver.d.ts +2 -2
- package/dist/engine/sql-driver.js +0 -1
- package/dist/engine/sql-json.d.ts +0 -1
- package/dist/engine/sql-json.js +53 -7
- package/dist/engine/sql-semantics.d.ts +8 -5
- package/dist/engine/sql-semantics.js +427 -65
- package/dist/engine/typed-live.d.ts +67 -0
- package/dist/engine/typed-live.js +349 -0
- package/dist/engine/vector.d.ts +7 -1
- package/dist/engine/vector.js +202 -58
- package/dist/engine/worker-host.d.ts +8 -2
- package/dist/engine/worker-host.js +616 -152
- package/dist/engine/worker.d.ts +0 -1
- package/dist/engine/worker.js +3 -3
- package/dist/engine/write-block-planner.d.ts +18 -0
- package/dist/engine/write-block-planner.js +112 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/plan/index.d.ts +0 -1
- package/dist/plan/index.js +0 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/indexeddb.d.ts +74 -65
- package/dist/storage/indexeddb.js +12301 -2076
- package/dist/storage/memory.d.ts +56 -66
- package/dist/storage/memory.js +1004 -139
- package/dist/storage/opfs/files.d.ts +18 -7
- package/dist/storage/opfs/files.js +115 -28
- package/dist/storage/opfs/index.d.ts +1 -1
- package/dist/storage/opfs/index.js +1 -1
- package/dist/storage/opfs/leader.d.ts +403 -91
- package/dist/storage/opfs/leader.js +4306 -602
- package/dist/storage/opfs/rpc.d.ts +15 -3
- package/dist/storage/opfs/rpc.js +223 -2
- package/dist/storage/opfs/snapshot-ledger.d.ts +40 -0
- package/dist/storage/opfs/snapshot-ledger.js +281 -0
- package/dist/storage/opfs/store.d.ts +26 -121
- package/dist/storage/opfs/store.js +436 -388
- package/dist/storage/persistence.d.ts +37 -0
- package/dist/storage/persistence.js +78 -0
- package/dist/storage/snapshot-stream.d.ts +24 -0
- package/dist/storage/snapshot-stream.js +897 -0
- package/dist/storage/snapshot.d.ts +9 -99
- package/dist/storage/snapshot.js +33 -309
- package/dist/storage/toolkit/extents.d.ts +41 -7
- package/dist/storage/toolkit/extents.js +402 -39
- package/dist/storage/toolkit/index.d.ts +3 -4
- package/dist/storage/toolkit/index.js +27 -3
- package/dist/storage/toolkit/record-core.d.ts +174 -61
- package/dist/storage/toolkit/record-core.js +5401 -849
- package/dist/storage/toolkit/sync-file.d.ts +10 -1
- package/dist/storage/toolkit/sync-file.js +50 -2
- package/dist/storage/toolkit/wal.d.ts +23 -5
- package/dist/storage/toolkit/wal.js +89 -27
- package/dist/storage/toolkit/wire.d.ts +4 -6
- package/dist/storage/toolkit/wire.js +80 -25
- package/dist/storage/types.d.ts +1271 -218
- package/dist/storage/types.js +1471 -138
- package/dist/testing/block-store-conformance.d.ts +0 -1
- package/dist/testing/block-store-conformance.js +877 -138
- package/dist/testing/index.d.ts +42 -31
- package/dist/testing/index.js +100 -68
- package/dist/testing/opfs-shim.d.ts +13 -3
- package/dist/testing/opfs-shim.js +40 -6
- package/dist/testing/simulator.d.ts +0 -1
- package/dist/testing/simulator.js +43 -12
- package/dist/testing/sqllogictest.d.ts +0 -1
- package/dist/testing/sqllogictest.js +0 -1
- package/dist/transactions/index.d.ts +81 -20
- package/dist/transactions/index.js +1050 -268
- package/dist/worker-protocol/index.d.ts +3 -2
- package/dist/worker-protocol/index.js +2 -5
- package/package.json +49 -1
- package/dist/block-format/block.d.ts.map +0 -1
- package/dist/block-format/block.js.map +0 -1
- package/dist/block-format/checksum.d.ts.map +0 -1
- package/dist/block-format/checksum.js.map +0 -1
- package/dist/block-format/codecs.d.ts.map +0 -1
- package/dist/block-format/codecs.js.map +0 -1
- package/dist/block-format/column.d.ts.map +0 -1
- package/dist/block-format/column.js.map +0 -1
- package/dist/block-format/index.d.ts.map +0 -1
- package/dist/block-format/index.js.map +0 -1
- package/dist/block-format/physical.d.ts.map +0 -1
- package/dist/block-format/physical.js.map +0 -1
- package/dist/block-format/types.d.ts.map +0 -1
- package/dist/block-format/types.js.map +0 -1
- package/dist/engine/artifact-cache.d.ts.map +0 -1
- package/dist/engine/artifact-cache.js.map +0 -1
- package/dist/engine/batch.d.ts.map +0 -1
- package/dist/engine/batch.js.map +0 -1
- package/dist/engine/buffered-writer.d.ts.map +0 -1
- package/dist/engine/buffered-writer.js.map +0 -1
- package/dist/engine/catalog.d.ts.map +0 -1
- package/dist/engine/catalog.js.map +0 -1
- package/dist/engine/client.d.ts.map +0 -1
- package/dist/engine/client.js.map +0 -1
- package/dist/engine/coordinator.d.ts +0 -17
- package/dist/engine/coordinator.d.ts.map +0 -1
- package/dist/engine/coordinator.js +0 -60
- package/dist/engine/coordinator.js.map +0 -1
- package/dist/engine/database.d.ts.map +0 -1
- package/dist/engine/database.js.map +0 -1
- package/dist/engine/defaults.d.ts.map +0 -1
- package/dist/engine/defaults.js.map +0 -1
- package/dist/engine/errors.d.ts.map +0 -1
- package/dist/engine/errors.js.map +0 -1
- package/dist/engine/fts.d.ts.map +0 -1
- package/dist/engine/fts.js.map +0 -1
- package/dist/engine/group-index.d.ts.map +0 -1
- package/dist/engine/group-index.js.map +0 -1
- package/dist/engine/index.d.ts.map +0 -1
- package/dist/engine/index.js.map +0 -1
- package/dist/engine/join-index.d.ts.map +0 -1
- package/dist/engine/join-index.js.map +0 -1
- package/dist/engine/live.d.ts.map +0 -1
- package/dist/engine/live.js.map +0 -1
- package/dist/engine/memory.d.ts.map +0 -1
- package/dist/engine/memory.js.map +0 -1
- package/dist/engine/optimizer.d.ts.map +0 -1
- package/dist/engine/optimizer.js.map +0 -1
- package/dist/engine/query-cache.d.ts.map +0 -1
- package/dist/engine/query-cache.js.map +0 -1
- package/dist/engine/query.d.ts.map +0 -1
- package/dist/engine/query.js.map +0 -1
- package/dist/engine/result-wire.d.ts.map +0 -1
- package/dist/engine/result-wire.js.map +0 -1
- package/dist/engine/schema-wire.d.ts.map +0 -1
- package/dist/engine/schema-wire.js.map +0 -1
- package/dist/engine/schema.d.ts.map +0 -1
- package/dist/engine/schema.js.map +0 -1
- package/dist/engine/sort-keys.d.ts.map +0 -1
- package/dist/engine/sort-keys.js.map +0 -1
- package/dist/engine/sql-domains.d.ts.map +0 -1
- package/dist/engine/sql-domains.js.map +0 -1
- package/dist/engine/sql-driver.d.ts.map +0 -1
- package/dist/engine/sql-driver.js.map +0 -1
- package/dist/engine/sql-json.d.ts.map +0 -1
- package/dist/engine/sql-json.js.map +0 -1
- package/dist/engine/sql-semantics.d.ts.map +0 -1
- package/dist/engine/sql-semantics.js.map +0 -1
- package/dist/engine/vector.d.ts.map +0 -1
- package/dist/engine/vector.js.map +0 -1
- package/dist/engine/worker-host.d.ts.map +0 -1
- package/dist/engine/worker-host.js.map +0 -1
- package/dist/engine/worker.d.ts.map +0 -1
- package/dist/engine/worker.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/plan/index.d.ts.map +0 -1
- package/dist/plan/index.js.map +0 -1
- package/dist/storage/fixture-shape.d.ts +0 -42
- package/dist/storage/fixture-shape.d.ts.map +0 -1
- package/dist/storage/fixture-shape.js +0 -146
- package/dist/storage/fixture-shape.js.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/indexeddb.d.ts.map +0 -1
- package/dist/storage/indexeddb.js.map +0 -1
- package/dist/storage/memory.d.ts.map +0 -1
- package/dist/storage/memory.js.map +0 -1
- package/dist/storage/opfs/files.d.ts.map +0 -1
- package/dist/storage/opfs/files.js.map +0 -1
- package/dist/storage/opfs/index.d.ts.map +0 -1
- package/dist/storage/opfs/index.js.map +0 -1
- package/dist/storage/opfs/leader.d.ts.map +0 -1
- package/dist/storage/opfs/leader.js.map +0 -1
- package/dist/storage/opfs/rpc.d.ts.map +0 -1
- package/dist/storage/opfs/rpc.js.map +0 -1
- package/dist/storage/opfs/store.d.ts.map +0 -1
- package/dist/storage/opfs/store.js.map +0 -1
- package/dist/storage/snapshot.d.ts.map +0 -1
- package/dist/storage/snapshot.js.map +0 -1
- package/dist/storage/toolkit/extents.d.ts.map +0 -1
- package/dist/storage/toolkit/extents.js.map +0 -1
- package/dist/storage/toolkit/index.d.ts.map +0 -1
- package/dist/storage/toolkit/index.js.map +0 -1
- package/dist/storage/toolkit/record-core.d.ts.map +0 -1
- package/dist/storage/toolkit/record-core.js.map +0 -1
- package/dist/storage/toolkit/sync-file.d.ts.map +0 -1
- package/dist/storage/toolkit/sync-file.js.map +0 -1
- package/dist/storage/toolkit/wal.d.ts.map +0 -1
- package/dist/storage/toolkit/wal.js.map +0 -1
- package/dist/storage/toolkit/wire.d.ts.map +0 -1
- package/dist/storage/toolkit/wire.js.map +0 -1
- package/dist/storage/types.d.ts.map +0 -1
- package/dist/storage/types.js.map +0 -1
- package/dist/testing/block-store-conformance.d.ts.map +0 -1
- package/dist/testing/block-store-conformance.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
- package/dist/testing/opfs-shim.d.ts.map +0 -1
- package/dist/testing/opfs-shim.js.map +0 -1
- package/dist/testing/seeds.d.ts +0 -11
- package/dist/testing/seeds.d.ts.map +0 -1
- package/dist/testing/seeds.js +0 -50
- package/dist/testing/seeds.js.map +0 -1
- package/dist/testing/simulator.d.ts.map +0 -1
- package/dist/testing/simulator.js.map +0 -1
- package/dist/testing/sqllogictest.d.ts.map +0 -1
- package/dist/testing/sqllogictest.js.map +0 -1
- package/dist/transactions/index.d.ts.map +0 -1
- package/dist/transactions/index.js.map +0 -1
- package/dist/worker-protocol/index.d.ts.map +0 -1
- package/dist/worker-protocol/index.js.map +0 -1
package/dist/engine/memory.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export interface QueryMemoryUsage {
|
|
|
3
3
|
readonly usedBytes: number;
|
|
4
4
|
readonly peakBytes: number;
|
|
5
5
|
}
|
|
6
|
+
/** Finite default for every public engine execution path. */
|
|
7
|
+
export declare const DEFAULT_QUERY_MEMORY_BUDGET_BYTES: number;
|
|
6
8
|
export declare class QueryMemoryBudgetError extends Error {
|
|
7
9
|
readonly label: string;
|
|
8
10
|
readonly requestedBytes: number;
|
|
@@ -34,4 +36,3 @@ export declare class QueryMemoryReservation {
|
|
|
34
36
|
constructor(context: QueryMemoryContext, bytes: number);
|
|
35
37
|
release(): void;
|
|
36
38
|
}
|
|
37
|
-
//# sourceMappingURL=memory.d.ts.map
|
package/dist/engine/memory.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Finite default for every public engine execution path. */
|
|
2
|
+
export const DEFAULT_QUERY_MEMORY_BUDGET_BYTES = 64 * 1024 * 1024;
|
|
1
3
|
export class QueryMemoryBudgetError extends Error {
|
|
2
4
|
label;
|
|
3
5
|
requestedBytes;
|
|
@@ -19,7 +21,7 @@ export class QueryMemoryContext {
|
|
|
19
21
|
#reservations = new Set();
|
|
20
22
|
#talliedBytes = 0;
|
|
21
23
|
#closed = false;
|
|
22
|
-
constructor(budgetBytes =
|
|
24
|
+
constructor(budgetBytes = DEFAULT_QUERY_MEMORY_BUDGET_BYTES, parent) {
|
|
23
25
|
if (!Number.isSafeInteger(budgetBytes) || budgetBytes < 0) {
|
|
24
26
|
throw new RangeError("Query memory budget must be a non-negative safe integer");
|
|
25
27
|
}
|
|
@@ -116,4 +118,3 @@ function validateMemoryBytes(bytes, label) {
|
|
|
116
118
|
throw new RangeError(`${label} must be a non-negative safe integer`);
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
|
-
//# sourceMappingURL=memory.js.map
|
|
@@ -17,4 +17,3 @@ export declare function chooseJoinOrder(plan: CompiledQuery, inputs: ReadonlyMap
|
|
|
17
17
|
}>): CompiledQuery;
|
|
18
18
|
/** Renders a stable, human-readable plan for snapshot tests and explain(). */
|
|
19
19
|
export declare function renderPlan(plan: CompiledQuery): string;
|
|
20
|
-
//# sourceMappingURL=optimizer.d.ts.map
|
package/dist/engine/optimizer.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { dateIsoString, dateMilliseconds } from "../date-value.js";
|
|
1
2
|
import { childExpressions, expressionAliases, forEachBlockExpression, forEachNestedBlock, isScalarFunctionName, scalarFunctionNames, scalarFunctionValue, splitCondition, volatileScalarFunctionNames, } from "./query.js";
|
|
2
3
|
import { isSqlDomainValue } from "./sql-domains.js";
|
|
3
4
|
/**
|
|
@@ -976,8 +977,8 @@ function foldBinary(operator, leftValue, rightValue) {
|
|
|
976
977
|
return undefined;
|
|
977
978
|
if (typeof leftValue === "string" || typeof rightValue === "string")
|
|
978
979
|
return undefined;
|
|
979
|
-
const left = leftValue instanceof Date ? leftValue
|
|
980
|
-
const right = rightValue instanceof Date ? rightValue
|
|
980
|
+
const left = leftValue instanceof Date ? dateMilliseconds(leftValue) : leftValue;
|
|
981
|
+
const right = rightValue instanceof Date ? dateMilliseconds(rightValue) : rightValue;
|
|
981
982
|
if ((operator === "/" || operator === "%") && right === 0)
|
|
982
983
|
return null;
|
|
983
984
|
const result = operator === "+"
|
|
@@ -1360,7 +1361,7 @@ function renderExpression(expression) {
|
|
|
1360
1361
|
if (value === null)
|
|
1361
1362
|
return "null";
|
|
1362
1363
|
if (value instanceof Date)
|
|
1363
|
-
return `date ${value
|
|
1364
|
+
return `date ${dateIsoString(value)}`;
|
|
1364
1365
|
if (typeof value === "string")
|
|
1365
1366
|
return `'${value}'`;
|
|
1366
1367
|
return String(value);
|
|
@@ -1402,4 +1403,3 @@ function renderExpression(expression) {
|
|
|
1402
1403
|
}
|
|
1403
1404
|
return `${expression.name}(...) over (...)`;
|
|
1404
1405
|
}
|
|
1405
|
-
//# sourceMappingURL=optimizer.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** SQL compilation, standalone execution, and plan inspection for tooling and adapters. */
|
|
2
|
+
export { bindPlanParameters, bindStatementParameters, compileQuery, compileStatement, executeQuery, referencedColumns, type InsertValue, type CompiledQuery, type CompiledStatement, type QueryResult, type QueryRow, type QueryExecutionOptions, type QueryValue, type SqlColumnSchema, type SqlColumnType, } from "./query.js";
|
|
3
|
+
export { optimizePlan, renderPlan } from "./optimizer.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** SQL compilation, standalone execution, and plan inspection for tooling and adapters. */
|
|
2
|
+
export { bindPlanParameters, bindStatementParameters, compileQuery, compileStatement, executeQuery, referencedColumns, } from "./query.js";
|
|
3
|
+
export { optimizePlan, renderPlan } from "./optimizer.js";
|
|
@@ -19,4 +19,3 @@ export declare function planMemoKey(plan: unknown): string;
|
|
|
19
19
|
export declare function copyQueryResult(result: QueryResult): QueryResult;
|
|
20
20
|
/** Modeled retained payload for one cached query result. */
|
|
21
21
|
export declare function queryResultRetainedBytes(result: QueryResult): number;
|
|
22
|
-
//# sourceMappingURL=query-cache.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { copyDate, dateMilliseconds } from "../date-value.js";
|
|
1
2
|
import { copyQueryResultExternalization } from "./query.js";
|
|
2
3
|
import { defineSqlResultProperty } from "./sql-semantics.js";
|
|
3
4
|
/** Modest per-entry cap so one giant result cannot thrash the shared artifact cache. */
|
|
@@ -14,7 +15,7 @@ export function queryResultMemoKey(sql, params) {
|
|
|
14
15
|
export function planMemoKey(plan) {
|
|
15
16
|
return JSON.stringify(plan, (_key, value) => {
|
|
16
17
|
if (value instanceof Date)
|
|
17
|
-
return { $date: value
|
|
18
|
+
return { $date: dateMilliseconds(value) };
|
|
18
19
|
if (typeof value === "bigint")
|
|
19
20
|
return { $bigint: value.toString() };
|
|
20
21
|
if (typeof value === "number") {
|
|
@@ -42,7 +43,7 @@ export function copyQueryResult(result) {
|
|
|
42
43
|
for (const name of columns) {
|
|
43
44
|
const value = copy[name];
|
|
44
45
|
if (value instanceof Date)
|
|
45
|
-
defineSqlResultProperty(copy, name,
|
|
46
|
+
defineSqlResultProperty(copy, name, copyDate(value));
|
|
46
47
|
}
|
|
47
48
|
return copy;
|
|
48
49
|
}),
|
|
@@ -83,7 +84,6 @@ function encodeParameter(value) {
|
|
|
83
84
|
if (typeof value === "string")
|
|
84
85
|
return [3, value];
|
|
85
86
|
if (value instanceof Date)
|
|
86
|
-
return [4, value
|
|
87
|
+
return [4, dateMilliseconds(value)];
|
|
87
88
|
throw new TypeError("Query parameter has an unsupported value");
|
|
88
89
|
}
|
|
89
|
-
//# sourceMappingURL=query-cache.js.map
|
package/dist/engine/query.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { DatabaseRow } from "./database.js";
|
|
|
2
2
|
import type { ColumnDefault, SqlDomain } from "../storage/types.js";
|
|
3
3
|
import { type FtsStats } from "./fts.js";
|
|
4
4
|
import { QueryMemoryContext, type QueryMemoryUsage } from "./memory.js";
|
|
5
|
-
import { type ColumnarTable, type AsyncQueryExecutionOptions } from "./vector.js";
|
|
5
|
+
import { type ColumnarTable, type AsyncQueryExecutionOptions, type QueryBatchExecutionOptions } from "./vector.js";
|
|
6
6
|
export type QueryValue = boolean | number | string | Date | null;
|
|
7
7
|
export type QueryRow = Record<string, QueryValue>;
|
|
8
8
|
export interface QueryResult {
|
|
@@ -19,6 +19,7 @@ export interface PreparedQuery {
|
|
|
19
19
|
readonly memoryUsage: QueryMemoryUsage;
|
|
20
20
|
execute(): QueryResult;
|
|
21
21
|
executeAsync(options?: AsyncQueryExecutionOptions): Promise<QueryResult>;
|
|
22
|
+
executeBatches(options: QueryBatchExecutionOptions, consume: (batch: QueryResult) => void | Promise<void>): Promise<readonly string[]>;
|
|
22
23
|
close(): void;
|
|
23
24
|
}
|
|
24
25
|
export interface QueryExecutionOptions {
|
|
@@ -818,12 +819,9 @@ export interface ListMembership {
|
|
|
818
819
|
export declare function cachedListMembership(node: object, items: ReadonlyArray<{
|
|
819
820
|
kind: string;
|
|
820
821
|
}>): ListMembership | null;
|
|
821
|
-
/** Compiles a LIKE pattern (% = any run, _ = any character) to an anchored RegExp, cached. */
|
|
822
|
-
export declare function likeRegExp(pattern: string, caseInsensitive?: boolean, escape?: string): RegExp;
|
|
823
822
|
/**
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
* dominate real workloads — and everything else falls back to the anchored RegExp.
|
|
823
|
+
* Shared bounded LIKE matcher. Compilation and the common literal prefix/suffix/containment
|
|
824
|
+
* fast paths are cached in sql-semantics; complex wildcard shapes have deterministic work caps.
|
|
827
825
|
*/
|
|
828
826
|
export declare function likeMatches(pattern: string, value: string, caseInsensitive?: boolean, escape?: string): boolean;
|
|
829
827
|
/** Splits a quantified operator like "> ANY" into its comparison and quantifier. */
|
|
@@ -961,4 +959,3 @@ export declare function validateOffset(offset: number): number;
|
|
|
961
959
|
*/
|
|
962
960
|
export declare function splitCondition(expression: Expression): Predicate[];
|
|
963
961
|
export {};
|
|
964
|
-
//# sourceMappingURL=query.d.ts.map
|