@crvouga/sqlite-mem 0.1.0 → 0.2.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/AGENTS.md +156 -0
- package/COMPATIBILITY-AUDIT.md +7 -9
- package/COMPATIBILITY.md +4 -3
- package/README.md +152 -14
- package/compat/coverage.json +797 -512
- package/compat/requirements.json +1 -1
- package/dist/api/database.d.ts +90 -12
- package/dist/api/statement.d.ts +74 -17
- package/dist/ast/nodes.d.ts +11 -2
- package/dist/constraints/check.d.ts +5 -6
- package/dist/errors/index.d.ts +25 -1
- package/dist/executor/attach.d.ts +3 -4
- package/dist/executor/ddl.d.ts +3 -4
- package/dist/executor/dml.d.ts +4 -4
- package/dist/executor/env.d.ts +9 -11
- package/dist/executor/execute.d.ts +3 -4
- package/dist/executor/pragma.d.ts +3 -4
- package/dist/executor/result.d.ts +9 -5
- package/dist/executor/select.d.ts +4 -5
- package/dist/executor/simple-select.d.ts +3 -4
- package/dist/executor/triggers.d.ts +6 -7
- package/dist/executor/vtable.d.ts +5 -6
- package/dist/expressions/context.d.ts +5 -5
- package/dist/expressions/equals.d.ts +3 -0
- package/dist/expressions/eval.d.ts +9 -4
- package/dist/expressions/index.d.ts +3 -4
- package/dist/expressions/like.d.ts +13 -3
- package/dist/functions/aggregate.d.ts +1 -2
- package/dist/functions/datetime.d.ts +1 -2
- package/dist/functions/extensions.d.ts +1 -2
- package/dist/functions/index.d.ts +8 -9
- package/dist/functions/json.d.ts +3 -4
- package/dist/functions/math.d.ts +1 -2
- package/dist/functions/registry.d.ts +5 -6
- package/dist/functions/scalar.d.ts +2 -3
- package/dist/functions/table-valued.d.ts +3 -4
- package/dist/functions/window.d.ts +1 -2
- package/dist/index.d.ts +33 -12
- package/dist/index.js +900 -120
- package/dist/index.js.map +4 -4
- package/dist/indexes/index.d.ts +17 -4
- package/dist/json/index.d.ts +7 -8
- package/dist/json/jsonb.d.ts +1 -2
- package/dist/json/ops.d.ts +8 -3
- package/dist/json/parse.d.ts +2 -3
- package/dist/json/path.d.ts +1 -2
- package/dist/json/stringify.d.ts +1 -2
- package/dist/json/tvf.d.ts +1 -2
- package/dist/json/types.d.ts +0 -1
- package/dist/lexer/tokenize.d.ts +7 -1
- package/dist/parser/index.d.ts +11 -5
- package/dist/parser/parser.d.ts +3 -3
- package/dist/planner/access.d.ts +13 -6
- package/dist/planner/index.d.ts +1 -2
- package/dist/runtime/clock.d.ts +8 -2
- package/dist/runtime/index.d.ts +3 -4
- package/dist/runtime/options.d.ts +5 -4
- package/dist/runtime/prng.d.ts +12 -1
- package/dist/schema/catalog.d.ts +2 -3
- package/dist/serialization/codec.d.ts +17 -2
- package/dist/serialization/index.d.ts +1 -2
- package/dist/storage/database-state.d.ts +16 -8
- package/dist/storage/index.d.ts +6 -7
- package/dist/storage/row.d.ts +1 -2
- package/dist/storage/table.d.ts +8 -4
- package/dist/transactions/manager.d.ts +2 -3
- package/dist/types/collation.d.ts +1 -2
- package/dist/types/strict.d.ts +6 -0
- package/dist/types/value.d.ts +30 -2
- package/dist/vtable/fts/options.d.ts +0 -1
- package/dist/vtable/fts/porter.d.ts +0 -1
- package/dist/vtable/fts/query.d.ts +0 -1
- package/dist/vtable/fts/table.d.ts +5 -6
- package/dist/vtable/fts/tokenize.d.ts +1 -2
- package/dist/vtable/fts5.d.ts +1 -2
- package/dist/vtable/index.d.ts +2 -3
- package/dist/vtable/modules.d.ts +2 -3
- package/package.json +14 -7
- package/compat/gate-report.json +0 -424
- package/dist/api/database.d.ts.map +0 -1
- package/dist/api/statement.d.ts.map +0 -1
- package/dist/ast/nodes.d.ts.map +0 -1
- package/dist/constraints/check.d.ts.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/executor/attach.d.ts.map +0 -1
- package/dist/executor/ddl.d.ts.map +0 -1
- package/dist/executor/dml.d.ts.map +0 -1
- package/dist/executor/env.d.ts.map +0 -1
- package/dist/executor/execute.d.ts.map +0 -1
- package/dist/executor/pragma.d.ts.map +0 -1
- package/dist/executor/result.d.ts.map +0 -1
- package/dist/executor/select.d.ts.map +0 -1
- package/dist/executor/simple-select.d.ts.map +0 -1
- package/dist/executor/triggers.d.ts.map +0 -1
- package/dist/executor/vtable.d.ts.map +0 -1
- package/dist/expressions/context.d.ts.map +0 -1
- package/dist/expressions/eval.d.ts.map +0 -1
- package/dist/expressions/index.d.ts.map +0 -1
- package/dist/expressions/like.d.ts.map +0 -1
- package/dist/functions/aggregate.d.ts.map +0 -1
- package/dist/functions/datetime.d.ts.map +0 -1
- package/dist/functions/extensions.d.ts.map +0 -1
- package/dist/functions/index.d.ts.map +0 -1
- package/dist/functions/json.d.ts.map +0 -1
- package/dist/functions/math.d.ts.map +0 -1
- package/dist/functions/registry.d.ts.map +0 -1
- package/dist/functions/scalar.d.ts.map +0 -1
- package/dist/functions/table-valued.d.ts.map +0 -1
- package/dist/functions/window.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/indexes/index.d.ts.map +0 -1
- package/dist/json/index.d.ts.map +0 -1
- package/dist/json/jsonb.d.ts.map +0 -1
- package/dist/json/ops.d.ts.map +0 -1
- package/dist/json/parse.d.ts.map +0 -1
- package/dist/json/path.d.ts.map +0 -1
- package/dist/json/stringify.d.ts.map +0 -1
- package/dist/json/tvf.d.ts.map +0 -1
- package/dist/json/types.d.ts.map +0 -1
- package/dist/lexer/tokenize.d.ts.map +0 -1
- package/dist/parser/index.d.ts.map +0 -1
- package/dist/parser/parser.d.ts.map +0 -1
- package/dist/planner/access.d.ts.map +0 -1
- package/dist/planner/index.d.ts.map +0 -1
- package/dist/runtime/clock.d.ts.map +0 -1
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/options.d.ts.map +0 -1
- package/dist/runtime/prng.d.ts.map +0 -1
- package/dist/schema/catalog.d.ts.map +0 -1
- package/dist/serialization/codec.d.ts.map +0 -1
- package/dist/serialization/index.d.ts.map +0 -1
- package/dist/storage/database-state.d.ts.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/row.d.ts.map +0 -1
- package/dist/storage/table.d.ts.map +0 -1
- package/dist/transactions/manager.d.ts.map +0 -1
- package/dist/types/collation.d.ts.map +0 -1
- package/dist/types/value.d.ts.map +0 -1
- package/dist/vtable/fts/options.d.ts.map +0 -1
- package/dist/vtable/fts/porter.d.ts.map +0 -1
- package/dist/vtable/fts/query.d.ts.map +0 -1
- package/dist/vtable/fts/table.d.ts.map +0 -1
- package/dist/vtable/fts/tokenize.d.ts.map +0 -1
- package/dist/vtable/fts5.d.ts.map +0 -1
- package/dist/vtable/index.d.ts.map +0 -1
- package/dist/vtable/modules.d.ts.map +0 -1
package/compat/requirements.json
CHANGED
package/dist/api/database.d.ts
CHANGED
|
@@ -1,26 +1,104 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { type DatabaseOptions } from "../runtime/index.js";
|
|
2
|
+
import type { BindValue, QueryRow } from "../types/value.js";
|
|
3
|
+
import { Statement } from "./statement.js";
|
|
4
|
+
/**
|
|
5
|
+
* Pure TypeScript in-memory SQLite database.
|
|
6
|
+
*
|
|
7
|
+
* Deterministic by default: `random()` / `randomblob()` use a seeded PRNG
|
|
8
|
+
* (`seed` defaults to `1`) and `date('now')` / friends use a fixed clock
|
|
9
|
+
* (`2000-01-01T00:00:00.000Z`). There is no filesystem or WASM.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { Database } from "@crvouga/sqlite-mem";
|
|
14
|
+
*
|
|
15
|
+
* const db = new Database();
|
|
16
|
+
* db.exec("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT NOT NULL)");
|
|
17
|
+
* db.exec("INSERT INTO users (name) VALUES (?)", ["Alice"]);
|
|
18
|
+
* const users = db.query<{ id: number; name: string }>("SELECT * FROM users");
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
5
21
|
export declare class Database {
|
|
6
|
-
|
|
22
|
+
/** Seed used to construct the PRNG when `options.prng` is omitted. */
|
|
7
23
|
readonly seed: number | bigint;
|
|
8
|
-
readonly prng: Prng;
|
|
9
|
-
now: Clock;
|
|
10
|
-
readonly transactions: TransactionManager;
|
|
11
24
|
private closed;
|
|
12
25
|
private transactionSequence;
|
|
26
|
+
/**
|
|
27
|
+
* Create an empty in-memory database.
|
|
28
|
+
*
|
|
29
|
+
* @param options - Determinism knobs. See {@link DatabaseOptions}.
|
|
30
|
+
*/
|
|
13
31
|
constructor(options?: DatabaseOptions);
|
|
14
|
-
|
|
15
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Execute SQL for its side effects (DDL/DML). Multiple statements are allowed.
|
|
34
|
+
*
|
|
35
|
+
* @param sql - SQL to run (semicolon-separated statements are ok).
|
|
36
|
+
* @param params - Bound parameters for `?` / `:name` placeholders.
|
|
37
|
+
* @throws {SqliteError} If the database is closed or the SQL fails.
|
|
38
|
+
*/
|
|
39
|
+
exec(sql: string, params?: readonly BindValue[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* Execute a query and return all rows as objects keyed by column name.
|
|
42
|
+
*
|
|
43
|
+
* @typeParam T - Row shape. Defaults to {@link QueryRow}.
|
|
44
|
+
* @param sql - SQL SELECT (or any statement that produces a result set).
|
|
45
|
+
* @param params - Bound parameters for `?` / `:name` placeholders.
|
|
46
|
+
* @returns All result rows.
|
|
47
|
+
* @throws {SqliteError} If the database is closed or the SQL fails.
|
|
48
|
+
*/
|
|
49
|
+
query<T = QueryRow>(sql: string, params?: readonly BindValue[]): T[];
|
|
50
|
+
/**
|
|
51
|
+
* Compile `sql` into a reusable {@link Statement}.
|
|
52
|
+
*
|
|
53
|
+
* @param sql - SQL to prepare.
|
|
54
|
+
* @throws {SqliteError} If the database is closed or `sql` cannot be parsed.
|
|
55
|
+
*/
|
|
16
56
|
prepare(sql: string): Statement;
|
|
57
|
+
/**
|
|
58
|
+
* Run `fn` inside a transaction. Commits on success; rolls back if `fn` throws.
|
|
59
|
+
*
|
|
60
|
+
* Nested calls use SAVEPOINTs so an inner failure does not abort the outer
|
|
61
|
+
* transaction.
|
|
62
|
+
*
|
|
63
|
+
* @param fn - Work to run while the transaction is open.
|
|
64
|
+
* @returns The value returned by `fn`.
|
|
65
|
+
* @throws {SqliteError} If the database is closed. Re-throws whatever `fn` throws after rollback.
|
|
66
|
+
*/
|
|
17
67
|
transaction<T>(fn: () => T): T;
|
|
68
|
+
/**
|
|
69
|
+
* Serialize schema, rows, PRNG state, and clock into a custom snapshot blob.
|
|
70
|
+
*
|
|
71
|
+
* This is not a `.sqlite` file. Restore it with {@link restore}.
|
|
72
|
+
*
|
|
73
|
+
* @throws {SqliteError} If the database is closed.
|
|
74
|
+
*/
|
|
18
75
|
snapshot(): Uint8Array;
|
|
76
|
+
/**
|
|
77
|
+
* Replace this database's contents with a blob from {@link snapshot}.
|
|
78
|
+
*
|
|
79
|
+
* Restores PRNG state and the clock when the snapshot includes them (v2).
|
|
80
|
+
*
|
|
81
|
+
* @param snapshot - Bytes previously returned by {@link snapshot}.
|
|
82
|
+
* @throws {SqliteError} If the database is closed, a transaction is open, or the blob is invalid.
|
|
83
|
+
*/
|
|
19
84
|
restore(snapshot: Uint8Array): void;
|
|
85
|
+
/**
|
|
86
|
+
* Close the database. Further SQL throws {@link SqliteError}. Idempotent.
|
|
87
|
+
*
|
|
88
|
+
* Rolls back an open transaction, if any.
|
|
89
|
+
*/
|
|
20
90
|
close(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Rows changed by the most recent INSERT / UPDATE / DELETE (SQLite `changes()`).
|
|
93
|
+
*
|
|
94
|
+
* @throws {SqliteError} If the database is closed.
|
|
95
|
+
*/
|
|
21
96
|
get changes(): number;
|
|
97
|
+
/**
|
|
98
|
+
* Rowid of the most recent INSERT (SQLite `last_insert_rowid()`).
|
|
99
|
+
*
|
|
100
|
+
* @throws {SqliteError} If the database is closed.
|
|
101
|
+
*/
|
|
22
102
|
get lastInsertRowid(): number | bigint;
|
|
23
|
-
assertOpen(): void;
|
|
24
103
|
}
|
|
25
104
|
export type { DatabaseOptions };
|
|
26
|
-
//# sourceMappingURL=database.d.ts.map
|
package/dist/api/statement.d.ts
CHANGED
|
@@ -1,27 +1,84 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { ResultSet } from "../executor/result.js";
|
|
2
|
+
import type { BindValue, QueryRow } from "../types/value.js";
|
|
3
|
+
/** Mutation counters returned by {@link Statement.run}. */
|
|
4
|
+
export interface RunResult {
|
|
5
|
+
/** Rows changed by this execution (SQLite `changes()`). */
|
|
6
|
+
changes: number;
|
|
7
|
+
/** Rowid of the most recent INSERT in this execution. */
|
|
8
|
+
lastInsertRowid: number | bigint;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Prepared SQL statement bound to a {@link Database}.
|
|
12
|
+
*
|
|
13
|
+
* Create with {@link Database.prepare}. Extra arguments to {@link run},
|
|
14
|
+
* {@link all}, {@link get}, or {@link result} override values from {@link bind};
|
|
15
|
+
* otherwise the last `bind()` parameters are used.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { Database } from "@crvouga/sqlite-mem";
|
|
20
|
+
*
|
|
21
|
+
* const db = new Database();
|
|
22
|
+
* db.exec("CREATE TABLE t (id INTEGER PRIMARY KEY, name TEXT)");
|
|
23
|
+
* const insert = db.prepare("INSERT INTO t (name) VALUES (?)");
|
|
24
|
+
* insert.run("Ada");
|
|
25
|
+
* const row = db.prepare("SELECT id, name FROM t WHERE id = ?").get<{ id: number; name: string }>(1);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
5
28
|
export declare class Statement {
|
|
6
29
|
private readonly database;
|
|
7
30
|
private readonly sql;
|
|
8
|
-
private readonly statements;
|
|
9
31
|
private bound;
|
|
10
32
|
private namedPlan;
|
|
11
33
|
private env;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
private statements;
|
|
35
|
+
private schemaVersion;
|
|
36
|
+
private constructor();
|
|
37
|
+
/**
|
|
38
|
+
* Store parameters for later {@link run} / {@link all} / {@link get} / {@link result}.
|
|
39
|
+
*
|
|
40
|
+
* Supports positional `?` / `?NNN` and named `:name` / `@name` / `$name` placeholders.
|
|
41
|
+
*
|
|
42
|
+
* @param params - Values to bind, in placeholder order.
|
|
43
|
+
* @returns `this` for chaining.
|
|
44
|
+
*/
|
|
45
|
+
bind(...params: BindValue[]): Statement;
|
|
46
|
+
/**
|
|
47
|
+
* Execute for side effects (INSERT / UPDATE / DELETE / DDL).
|
|
48
|
+
*
|
|
49
|
+
* @param params - If provided, override the last {@link bind}; otherwise bound values are used.
|
|
50
|
+
* @returns Mutation counters for this execution.
|
|
51
|
+
* @throws {SqliteError} If the database is closed, the statement is empty, or execution fails.
|
|
52
|
+
*/
|
|
53
|
+
run(...params: BindValue[]): RunResult;
|
|
54
|
+
/**
|
|
55
|
+
* Execute and return every result row as an object keyed by column name.
|
|
56
|
+
*
|
|
57
|
+
* @typeParam T - Row shape. Defaults to {@link QueryRow}.
|
|
58
|
+
* @param params - If provided, override the last {@link bind}; otherwise bound values are used.
|
|
59
|
+
* @throws {SqliteError} If the database is closed, the statement is empty, or execution fails.
|
|
60
|
+
*/
|
|
61
|
+
all<T = QueryRow>(...params: BindValue[]): T[];
|
|
62
|
+
/**
|
|
63
|
+
* Execute and return the full {@link ResultSet}, including column names.
|
|
64
|
+
*
|
|
65
|
+
* Use this when you need metadata for an empty result (column names with zero rows).
|
|
66
|
+
* {@link all} only returns row objects.
|
|
67
|
+
*
|
|
68
|
+
* @param params - If provided, override the last {@link bind}; otherwise bound values are used.
|
|
69
|
+
* @throws {SqliteError} If the database is closed, the statement is empty, or execution fails.
|
|
70
|
+
*/
|
|
71
|
+
result(...params: BindValue[]): ResultSet;
|
|
72
|
+
/**
|
|
73
|
+
* Execute and return the first row, or `undefined` if there are no rows.
|
|
74
|
+
*
|
|
75
|
+
* @typeParam T - Row shape. Defaults to {@link QueryRow}.
|
|
76
|
+
* @param params - If provided, override the last {@link bind}; otherwise bound values are used.
|
|
77
|
+
* @throws {SqliteError} If the database is closed, the statement is empty, or execution fails.
|
|
78
|
+
*/
|
|
79
|
+
get<T = QueryRow>(...params: BindValue[]): T | undefined;
|
|
22
80
|
private execute;
|
|
23
81
|
private obtainEnv;
|
|
82
|
+
private reprepareIfSchemaChanged;
|
|
24
83
|
private bindNamed;
|
|
25
84
|
}
|
|
26
|
-
export declare function bindNamedParameters(env: ExecutionEnv, sql: string, params: readonly unknown[]): void;
|
|
27
|
-
//# sourceMappingURL=statement.d.ts.map
|
package/dist/ast/nodes.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { SqlValue } from "../types/value.
|
|
1
|
+
import type { SqlValue } from "../types/value.js";
|
|
2
2
|
export type BinaryOp = "+" | "-" | "*" | "/" | "%" | "||" | "=" | "==" | "!=" | "<>" | "<" | "<=" | ">" | ">=" | "AND" | "OR" | "IS" | "IS NOT" | "IS DISTINCT FROM" | "IS NOT DISTINCT FROM" | "LIKE" | "NOT LIKE" | "GLOB" | "NOT GLOB" | "IN" | "NOT IN" | "MATCH" | "->" | "->>" | "&" | "|" | "<<" | ">>";
|
|
3
3
|
export type UnaryOp = "+" | "-" | "~" | "NOT";
|
|
4
|
+
/** Parsed SQL expression AST (literals, operators, functions, subqueries, …). */
|
|
4
5
|
export type Expr = LiteralExpr | NullExpr | ColumnRefExpr | UnaryExpr | BinaryExpr | BetweenExpr | InExpr | LikeExpr | FunctionExpr | AggregateExpr | WindowExpr | CaseExpr | CastExpr | ExistsExpr | SubqueryExpr | ParameterExpr | RowExpr | CollateExpr;
|
|
5
6
|
export interface LiteralExpr {
|
|
6
7
|
type: "literal";
|
|
@@ -78,6 +79,7 @@ export interface FrameSpec {
|
|
|
78
79
|
type: "ROWS" | "RANGE" | "GROUPS";
|
|
79
80
|
start: FrameBound;
|
|
80
81
|
end: FrameBound;
|
|
82
|
+
exclude: "no_others" | "current_row" | "group" | "ties" | null;
|
|
81
83
|
}
|
|
82
84
|
export type FrameBound = {
|
|
83
85
|
kind: "unbounded_preceding";
|
|
@@ -231,6 +233,7 @@ export interface InsertStmt {
|
|
|
231
233
|
}
|
|
232
234
|
export interface UpsertClause {
|
|
233
235
|
targetColumns: string[] | null;
|
|
236
|
+
targetExprs: Expr[] | null;
|
|
234
237
|
targetWhere: Expr | null;
|
|
235
238
|
action: "nothing" | {
|
|
236
239
|
set: SetItem[];
|
|
@@ -269,6 +272,7 @@ export interface CreateTableStmt {
|
|
|
269
272
|
constraints: TableConstraint[];
|
|
270
273
|
asSelect: SelectStmt | null;
|
|
271
274
|
withoutRowid: boolean;
|
|
275
|
+
strict: boolean;
|
|
272
276
|
}
|
|
273
277
|
export interface ColumnDef {
|
|
274
278
|
name: string;
|
|
@@ -301,6 +305,8 @@ export type ColumnConstraint = {
|
|
|
301
305
|
columns: string[] | null;
|
|
302
306
|
onDelete: FkAction | null;
|
|
303
307
|
onUpdate: FkAction | null;
|
|
308
|
+
deferrable: boolean;
|
|
309
|
+
initiallyDeferred: boolean;
|
|
304
310
|
} | {
|
|
305
311
|
type: "generated";
|
|
306
312
|
expr: Expr;
|
|
@@ -327,11 +333,15 @@ export type TableConstraint = {
|
|
|
327
333
|
onDelete: FkAction | null;
|
|
328
334
|
onUpdate: FkAction | null;
|
|
329
335
|
name: string | null;
|
|
336
|
+
deferrable: boolean;
|
|
337
|
+
initiallyDeferred: boolean;
|
|
330
338
|
};
|
|
331
339
|
export interface IndexedColumn {
|
|
332
340
|
name: string;
|
|
333
341
|
collate: string | null;
|
|
334
342
|
order: "ASC" | "DESC" | null;
|
|
343
|
+
/** Present when the index key is an expression rather than a bare column. */
|
|
344
|
+
expr?: Expr | null;
|
|
335
345
|
}
|
|
336
346
|
export type ConflictAction = "ROLLBACK" | "ABORT" | "FAIL" | "IGNORE" | "REPLACE";
|
|
337
347
|
export type FkAction = "SET NULL" | "SET DEFAULT" | "CASCADE" | "RESTRICT" | "NO ACTION";
|
|
@@ -448,4 +458,3 @@ export interface ExplainStmt {
|
|
|
448
458
|
queryPlan: boolean;
|
|
449
459
|
statement: Statement;
|
|
450
460
|
}
|
|
451
|
-
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type { Expr } from "../ast/nodes.
|
|
2
|
-
import type { IndexStore } from "../indexes/index.
|
|
3
|
-
import type { Row, Rowid } from "../storage/row.
|
|
4
|
-
import type { ColumnInfo, Table } from "../storage/table.
|
|
5
|
-
import type { SqlValue } from "../types/value.
|
|
1
|
+
import type { Expr } from "../ast/nodes.js";
|
|
2
|
+
import type { IndexStore } from "../indexes/index.js";
|
|
3
|
+
import type { Row, Rowid } from "../storage/row.js";
|
|
4
|
+
import type { ColumnInfo, Table } from "../storage/table.js";
|
|
5
|
+
import type { SqlValue } from "../types/value.js";
|
|
6
6
|
export type CheckEvaluator = (expr: Expr, row: Row) => SqlValue;
|
|
7
7
|
export declare function checkNotNull(columns: readonly ColumnInfo[], row: Row, tableName?: string): void;
|
|
8
8
|
export declare function checkPrimaryKey(columns: readonly ColumnInfo[], row: Row, tableName?: string): void;
|
|
9
9
|
export declare function checkUnique(index: IndexStore, values: readonly SqlValue[], rowid?: Rowid): void;
|
|
10
10
|
export declare function checkExpressions(expressions: readonly Expr[], row: Row, evaluate: CheckEvaluator, constraintName?: string): void;
|
|
11
11
|
export declare function checkTableConstraints(table: Table, row: Row, evaluate: CheckEvaluator): void;
|
|
12
|
-
//# sourceMappingURL=check.d.ts.map
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,7 +1,32 @@
|
|
|
1
|
+
/** Coarse classification of {@link SqliteError} for catch-site branching. */
|
|
1
2
|
export type ErrorCategory = "syntax" | "no_such_table" | "no_such_column" | "constraint_unique" | "constraint_primary" | "constraint_notnull" | "constraint_check" | "constraint_foreign" | "constraint" | "transaction" | "datatype_mismatch" | "unsupported" | "misuse" | "other";
|
|
3
|
+
/**
|
|
4
|
+
* Engine error. `name` is always `"SqliteError"`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { Database, SqliteError } from "@crvouga/sqlite-mem";
|
|
9
|
+
*
|
|
10
|
+
* const db = new Database();
|
|
11
|
+
* try {
|
|
12
|
+
* db.exec("SELECT * FROM missing");
|
|
13
|
+
* } catch (err) {
|
|
14
|
+
* if (err instanceof SqliteError && err.category === "no_such_table") {
|
|
15
|
+
* // handle
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
2
20
|
export declare class SqliteError extends Error {
|
|
21
|
+
/** Coarse error class (constraint vs syntax vs missing object, …). */
|
|
3
22
|
readonly category: ErrorCategory;
|
|
23
|
+
/** Optional SQLite result-code name such as `SQLITE_CONSTRAINT`. */
|
|
4
24
|
readonly sqliteCode?: string;
|
|
25
|
+
/**
|
|
26
|
+
* @param message - Human-readable error text.
|
|
27
|
+
* @param category - Coarse class; defaults to `"other"`.
|
|
28
|
+
* @param sqliteCode - Optional SQLite result-code name.
|
|
29
|
+
*/
|
|
5
30
|
constructor(message: string, category?: ErrorCategory, sqliteCode?: string);
|
|
6
31
|
}
|
|
7
32
|
export declare function unsupported(feature: string): never;
|
|
@@ -9,4 +34,3 @@ export declare class TriggerRaiseError extends SqliteError {
|
|
|
9
34
|
readonly action: "IGNORE" | "ABORT" | "FAIL" | "ROLLBACK";
|
|
10
35
|
constructor(action: "IGNORE" | "ABORT" | "FAIL" | "ROLLBACK", message?: string);
|
|
11
36
|
}
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { AttachStmt, DetachStmt } from "../ast/nodes.
|
|
2
|
-
import type { ExecutionEnv } from "./env.
|
|
3
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { AttachStmt, DetachStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { ExecutionEnv } from "./env.js";
|
|
3
|
+
import { type ResultSet } from "./result.js";
|
|
4
4
|
export declare function executeAttach(stmt: AttachStmt, env: ExecutionEnv): ResultSet;
|
|
5
5
|
export declare function executeDetach(stmt: DetachStmt, env: ExecutionEnv): ResultSet;
|
|
6
|
-
//# sourceMappingURL=attach.d.ts.map
|
package/dist/executor/ddl.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AlterTableStmt, CreateIndexStmt, CreateTableStmt, CreateViewStmt, DropIndexStmt, DropTableStmt, DropViewStmt } from "../ast/nodes.
|
|
2
|
-
import type { ExecutionEnv } from "./env.
|
|
3
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { AlterTableStmt, CreateIndexStmt, CreateTableStmt, CreateViewStmt, DropIndexStmt, DropTableStmt, DropViewStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { ExecutionEnv } from "./env.js";
|
|
3
|
+
import { type ResultSet } from "./result.js";
|
|
4
4
|
export declare function executeCreateTable(stmt: CreateTableStmt, env: ExecutionEnv): ResultSet;
|
|
5
5
|
export declare function executeCreateIndex(stmt: CreateIndexStmt, env: ExecutionEnv): ResultSet;
|
|
6
6
|
export declare function executeAlterTable(stmt: AlterTableStmt, env: ExecutionEnv): ResultSet;
|
|
@@ -8,4 +8,3 @@ export declare function executeDropTable(stmt: DropTableStmt, env: ExecutionEnv)
|
|
|
8
8
|
export declare function executeDropIndex(stmt: DropIndexStmt, env: ExecutionEnv): ResultSet;
|
|
9
9
|
export declare function executeCreateView(stmt: CreateViewStmt, env: ExecutionEnv): ResultSet;
|
|
10
10
|
export declare function executeDropView(stmt: DropViewStmt, env: ExecutionEnv): ResultSet;
|
|
11
|
-
//# sourceMappingURL=ddl.d.ts.map
|
package/dist/executor/dml.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DeleteStmt, InsertStmt, UpdateStmt } from "../ast/nodes.
|
|
2
|
-
import type { ExecutionEnv } from "./env.
|
|
3
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { DeleteStmt, InsertStmt, UpdateStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { ExecutionEnv } from "./env.js";
|
|
3
|
+
import { type ResultSet } from "./result.js";
|
|
4
4
|
export declare function executeInsert(stmt: InsertStmt, env: ExecutionEnv): ResultSet;
|
|
5
5
|
export declare function executeUpdate(stmt: UpdateStmt, env: ExecutionEnv): ResultSet;
|
|
6
6
|
export declare function executeDelete(stmt: DeleteStmt, env: ExecutionEnv): ResultSet;
|
|
7
|
-
|
|
7
|
+
export declare function checkDeferredForeignKeys(env: ExecutionEnv): void;
|
package/dist/executor/env.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type { SelectStmt } from "../ast/nodes.
|
|
2
|
-
import type { EvalContext } from "../expressions/context.
|
|
3
|
-
import { type FunctionRegistry } from "../functions/registry.
|
|
4
|
-
import type { DatabaseState } from "../storage/database-state.
|
|
5
|
-
import type { Rowid } from "../storage/row.
|
|
6
|
-
import type { TransactionManager } from "../transactions/manager.
|
|
7
|
-
import type {
|
|
8
|
-
import { type Affinity } from "../types/value.
|
|
9
|
-
import type { ResultSet } from "./result.ts";
|
|
1
|
+
import type { SelectStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { EvalContext } from "../expressions/context.js";
|
|
3
|
+
import { type FunctionRegistry } from "../functions/registry.js";
|
|
4
|
+
import type { DatabaseState } from "../storage/database-state.js";
|
|
5
|
+
import type { Rowid } from "../storage/row.js";
|
|
6
|
+
import type { TransactionManager } from "../transactions/manager.js";
|
|
7
|
+
import type { ResultSet } from "./result.js";
|
|
8
|
+
import { type Affinity, type SqlValue } from "../types/value.js";
|
|
10
9
|
export interface Cell {
|
|
11
10
|
table: string | null;
|
|
12
11
|
tableLower?: string | null;
|
|
@@ -26,7 +25,7 @@ export interface ScopeRow {
|
|
|
26
25
|
rowidName?: string;
|
|
27
26
|
sourceTable?: string;
|
|
28
27
|
/** Set when WHERE MATCH succeeds for this row. */
|
|
29
|
-
ftsMatch?: import("../vtable/fts5.
|
|
28
|
+
ftsMatch?: import("../vtable/fts5.js").FtsMatchCursor | null;
|
|
30
29
|
}
|
|
31
30
|
export type SelectRunner = (stmt: SelectStmt, env: ExecutionEnv, parent?: EvalContext) => ResultSet;
|
|
32
31
|
export interface ExecutionHooks {
|
|
@@ -59,4 +58,3 @@ export declare class ExecutionEnv {
|
|
|
59
58
|
createEvalContext(row?: ScopeRow | null, parent?: EvalContext): EvalContext;
|
|
60
59
|
}
|
|
61
60
|
export declare function toSqlValue(value: unknown): SqlValue;
|
|
62
|
-
//# sourceMappingURL=env.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Statement } from "../ast/nodes.
|
|
2
|
-
import type { ExecutionEnv } from "./env.
|
|
3
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { Statement } from "../ast/nodes.js";
|
|
2
|
+
import type { ExecutionEnv } from "./env.js";
|
|
3
|
+
import { type ResultSet } from "./result.js";
|
|
4
4
|
export declare function executeStatement(stmt: Statement, env: ExecutionEnv): ResultSet;
|
|
5
|
-
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Expr } from "../ast/nodes.
|
|
2
|
-
import type { ExecutionEnv } from "./env.
|
|
3
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { Expr } from "../ast/nodes.js";
|
|
2
|
+
import type { ExecutionEnv } from "./env.js";
|
|
3
|
+
import { type ResultSet } from "./result.js";
|
|
4
4
|
export declare function executePragma(name: string, expr: Expr | null, env: ExecutionEnv): ResultSet;
|
|
5
|
-
//# sourceMappingURL=pragma.d.ts.map
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { type SqlValue } from "../types/value.
|
|
1
|
+
import { type QueryRow, type QueryValue, type SqlValue } from "../types/value.js";
|
|
2
|
+
/** Query result returned by {@link Statement.result}. */
|
|
2
3
|
export interface ResultSet {
|
|
4
|
+
/** Result-column names, in SELECT order. Present even when `rows` is empty. */
|
|
3
5
|
columns: string[];
|
|
4
|
-
rows
|
|
6
|
+
/** Named rows. Duplicate column names keep the last value. */
|
|
7
|
+
rows: QueryRow[];
|
|
5
8
|
/** Positional rows preserve duplicate result-column names for internal use. */
|
|
6
|
-
values?:
|
|
9
|
+
values?: QueryValue[][];
|
|
10
|
+
/** Rows changed by the most recent mutating statement in this execution. */
|
|
7
11
|
changes: number;
|
|
12
|
+
/** Rowid of the most recent INSERT in this execution. */
|
|
8
13
|
lastInsertRowid: number | bigint;
|
|
9
14
|
}
|
|
10
15
|
export declare function emptyResult(changes?: number, lastInsertRowid?: number | bigint): ResultSet;
|
|
11
16
|
/** Export engine values to the public JS surface (SqlReal → number, SqlJsonText → string). */
|
|
12
|
-
export declare function exportSqlValue(value: SqlValue):
|
|
17
|
+
export declare function exportSqlValue(value: SqlValue): QueryValue;
|
|
13
18
|
export declare function valuesToResult(columns: string[], values: SqlValue[][], changes?: number, lastInsertRowid?: number | bigint, options?: {
|
|
14
19
|
named?: boolean;
|
|
15
20
|
keepValues?: boolean;
|
|
16
21
|
}): ResultSet;
|
|
17
22
|
export declare function resultValues(result: ResultSet): SqlValue[][];
|
|
18
|
-
//# sourceMappingURL=result.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { FromItem, SelectStmt } from "../ast/nodes.
|
|
2
|
-
import type { EvalContext } from "../expressions/context.
|
|
3
|
-
import type { ExecutionEnv, ScopeRow } from "./env.
|
|
4
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { FromItem, SelectStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { EvalContext } from "../expressions/context.js";
|
|
3
|
+
import type { ExecutionEnv, ScopeRow } from "./env.js";
|
|
4
|
+
import { type ResultSet } from "./result.js";
|
|
5
5
|
export declare function executeSelect(stmt: SelectStmt, env: ExecutionEnv, parent?: EvalContext): ResultSet;
|
|
6
6
|
export declare function scanFrom(item: FromItem, env: ExecutionEnv, parent?: EvalContext): ScopeRow[];
|
|
7
|
-
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { SelectStmt } from "../ast/nodes.
|
|
2
|
-
import type { ExecutionEnv } from "./env.
|
|
3
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { SelectStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { ExecutionEnv } from "./env.js";
|
|
3
|
+
import { type ResultSet } from "./result.js";
|
|
4
4
|
/**
|
|
5
5
|
* Tight path for `SELECT cols FROM table WHERE col = ?` (no join/group/order).
|
|
6
6
|
* Skips ScopeRow / evalExpr and honors maxRows during the scan.
|
|
7
7
|
*/
|
|
8
8
|
export declare function tryExecuteSimpleSelect(stmt: SelectStmt, env: ExecutionEnv): ResultSet | null;
|
|
9
9
|
export declare function tryExecuteSimpleJoin(stmt: SelectStmt, env: ExecutionEnv): ResultSet | null;
|
|
10
|
-
//# sourceMappingURL=simple-select.d.ts.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type { CreateTriggerStmt, DropTriggerStmt } from "../ast/nodes.
|
|
2
|
-
import type { Row } from "../storage/row.
|
|
3
|
-
import type { Table } from "../storage/table.
|
|
4
|
-
import { type SqlValue } from "../types/value.
|
|
5
|
-
import type { ExecutionEnv } from "./env.
|
|
6
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { CreateTriggerStmt, DropTriggerStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { Row } from "../storage/row.js";
|
|
3
|
+
import type { Table } from "../storage/table.js";
|
|
4
|
+
import { type SqlValue } from "../types/value.js";
|
|
5
|
+
import type { ExecutionEnv } from "./env.js";
|
|
6
|
+
import { type ResultSet } from "./result.js";
|
|
7
7
|
export declare function executeCreateTrigger(stmt: CreateTriggerStmt, env: ExecutionEnv): ResultSet;
|
|
8
8
|
export declare function executeDropTrigger(stmt: DropTriggerStmt, env: ExecutionEnv): ResultSet;
|
|
9
9
|
export declare function fireInsertTriggers(timing: "BEFORE" | "AFTER" | "INSTEAD", table: Table, values: Map<string, SqlValue>, oldRow: Row | null, env: ExecutionEnv): "ok" | "ignore";
|
|
10
10
|
export declare function fireUpdateTriggers(timing: "BEFORE" | "AFTER", table: Table, oldRow: Row, newValues: Map<string, SqlValue>, updatedColumns: Set<string>, env: ExecutionEnv): "ok" | "ignore";
|
|
11
11
|
export declare function fireDeleteTriggers(timing: "BEFORE" | "AFTER", table: Table, oldRow: Row, env: ExecutionEnv): "ok" | "ignore";
|
|
12
|
-
//# sourceMappingURL=triggers.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CreateVirtualTableStmt } from "../ast/nodes.
|
|
2
|
-
import type { SqlValue } from "../types/value.
|
|
3
|
-
import type { Fts5VirtualTable } from "../vtable/fts5.
|
|
4
|
-
import type { ExecutionEnv } from "./env.
|
|
5
|
-
import { type ResultSet } from "./result.
|
|
1
|
+
import type { CreateVirtualTableStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { SqlValue } from "../types/value.js";
|
|
3
|
+
import type { Fts5VirtualTable } from "../vtable/fts5.js";
|
|
4
|
+
import type { ExecutionEnv } from "./env.js";
|
|
5
|
+
import { type ResultSet } from "./result.js";
|
|
6
6
|
export declare function executeCreateVirtualTable(stmt: CreateVirtualTableStmt, env: ExecutionEnv): ResultSet;
|
|
7
7
|
export declare function executeFtsInsert(table: Fts5VirtualTable, columnNames: string[], sourceRows: SqlValue[][], env: ExecutionEnv): {
|
|
8
8
|
changes: number;
|
|
@@ -10,4 +10,3 @@ export declare function executeFtsInsert(table: Fts5VirtualTable, columnNames: s
|
|
|
10
10
|
};
|
|
11
11
|
export declare function executeFtsUpdate(table: Fts5VirtualTable, updates: Map<string, SqlValue>, rowids: Iterable<number | bigint>): number;
|
|
12
12
|
export declare function executeFtsDelete(table: Fts5VirtualTable, rowids: Iterable<number | bigint>): number;
|
|
13
|
-
//# sourceMappingURL=vtable.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { SelectStmt } from "../ast/nodes.
|
|
2
|
-
import type { FunctionContext, FunctionRegistry } from "../functions/registry.
|
|
3
|
-
import type { SqlValue, StorageClass } from "../types/value.
|
|
4
|
-
import type { FtsMatchCursor } from "../vtable/fts5.
|
|
1
|
+
import type { SelectStmt } from "../ast/nodes.js";
|
|
2
|
+
import type { FunctionContext, FunctionRegistry } from "../functions/registry.js";
|
|
3
|
+
import type { SqlValue, StorageClass } from "../types/value.js";
|
|
4
|
+
import type { FtsMatchCursor } from "../vtable/fts5.js";
|
|
5
|
+
/** Column / parameter / function resolution used by {@link evalExpr}. */
|
|
5
6
|
export interface EvalContext {
|
|
6
7
|
resolveColumn(table: string | null, name: string): SqlValue;
|
|
7
8
|
resolveStorageClass?(table: string | null, name: string): StorageClass;
|
|
@@ -25,4 +26,3 @@ export interface EvalContext {
|
|
|
25
26
|
functions?: FunctionRegistry;
|
|
26
27
|
functionContext?: FunctionContext;
|
|
27
28
|
}
|
|
28
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import type { Expr } from "../ast/nodes.
|
|
2
|
-
import { type SqlValue } from "../types/value.
|
|
3
|
-
import type { EvalContext } from "./context.
|
|
1
|
+
import type { Expr } from "../ast/nodes.js";
|
|
2
|
+
import { type SqlValue } from "../types/value.js";
|
|
3
|
+
import type { EvalContext } from "./context.js";
|
|
4
|
+
/**
|
|
5
|
+
* Evaluate a parsed SQL expression against `ctx` (columns, parameters, functions).
|
|
6
|
+
*
|
|
7
|
+
* @param expr - Expression AST node from {@link parse}.
|
|
8
|
+
* @param ctx - Column / parameter / function resolution.
|
|
9
|
+
*/
|
|
4
10
|
export declare function evalExpr(expr: Expr, ctx: EvalContext): SqlValue;
|
|
5
|
-
//# sourceMappingURL=eval.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export type { EvalContext } from "./context.
|
|
2
|
-
export { evalExpr } from "./eval.
|
|
3
|
-
export { globMatch, likeMatch } from "./like.
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export type { EvalContext } from "./context.js";
|
|
2
|
+
export { evalExpr } from "./eval.js";
|
|
3
|
+
export { globMatch, likeMatch } from "./like.js";
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* SQLite LIKE matching. ASCII letters are case-insensitive.
|
|
3
|
+
*
|
|
4
|
+
* @param text - Value to test.
|
|
5
|
+
* @param pattern - Pattern with `%` / `_` wildcards.
|
|
6
|
+
* @param escape - Optional single-character ESCAPE (or `null`).
|
|
7
|
+
*/
|
|
2
8
|
export declare function likeMatch(text: string, pattern: string, escape?: string | null): boolean;
|
|
3
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* SQLite GLOB matching. GLOB is case-sensitive and uses Unix `*` / `?` wildcards.
|
|
11
|
+
*
|
|
12
|
+
* @param text - Value to test.
|
|
13
|
+
* @param pattern - GLOB pattern.
|
|
14
|
+
*/
|
|
4
15
|
export declare function globMatch(text: string, pattern: string): boolean;
|
|
5
|
-
//# sourceMappingURL=like.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SqlValue } from "../types/value.
|
|
1
|
+
import { type SqlValue } from "../types/value.js";
|
|
2
2
|
export interface AggregateAccumulator {
|
|
3
3
|
step(args: SqlValue[]): void;
|
|
4
4
|
finalize(): SqlValue;
|
|
@@ -6,4 +6,3 @@ export interface AggregateAccumulator {
|
|
|
6
6
|
export type AggregateFactory = () => AggregateAccumulator;
|
|
7
7
|
export declare const aggregateFunctions: Readonly<Record<string, AggregateFactory>>;
|
|
8
8
|
export declare function createAggregate(name: string): AggregateAccumulator | undefined;
|
|
9
|
-
//# sourceMappingURL=aggregate.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { ScalarFunction } from "./registry.
|
|
1
|
+
import type { ScalarFunction } from "./registry.js";
|
|
2
2
|
/**
|
|
3
3
|
* FTS auxiliary functions. When used with a MATCH cursor they compute real
|
|
4
4
|
* values; without MATCH they mirror SQLite's empty-cursor defaults.
|
|
5
5
|
*/
|
|
6
6
|
export declare const ftsAuxFunctions: Readonly<Record<string, ScalarFunction>>;
|
|
7
7
|
export declare const rtreeAuxFunctions: Readonly<Record<string, ScalarFunction>>;
|
|
8
|
-
//# sourceMappingURL=extensions.d.ts.map
|