@crvouga/sqlite-mem 0.1.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/COMPATIBILITY-AUDIT.md +199 -0
- package/COMPATIBILITY.md +93 -0
- package/LICENSE +21 -0
- package/README.md +171 -0
- package/compat/coverage.json +21896 -0
- package/compat/fts-oracle-surface.json +198 -0
- package/compat/gate-report.json +424 -0
- package/compat/requirements.json +20929 -0
- package/dist/api/database.d.ts +26 -0
- package/dist/api/database.d.ts.map +1 -0
- package/dist/api/statement.d.ts +27 -0
- package/dist/api/statement.d.ts.map +1 -0
- package/dist/ast/nodes.d.ts +451 -0
- package/dist/ast/nodes.d.ts.map +1 -0
- package/dist/constraints/check.d.ts +12 -0
- package/dist/constraints/check.d.ts.map +1 -0
- package/dist/errors/index.d.ts +12 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/executor/attach.d.ts +6 -0
- package/dist/executor/attach.d.ts.map +1 -0
- package/dist/executor/ddl.d.ts +11 -0
- package/dist/executor/ddl.d.ts.map +1 -0
- package/dist/executor/dml.d.ts +7 -0
- package/dist/executor/dml.d.ts.map +1 -0
- package/dist/executor/env.d.ts +62 -0
- package/dist/executor/env.d.ts.map +1 -0
- package/dist/executor/execute.d.ts +5 -0
- package/dist/executor/execute.d.ts.map +1 -0
- package/dist/executor/pragma.d.ts +5 -0
- package/dist/executor/pragma.d.ts.map +1 -0
- package/dist/executor/result.d.ts +18 -0
- package/dist/executor/result.d.ts.map +1 -0
- package/dist/executor/select.d.ts +7 -0
- package/dist/executor/select.d.ts.map +1 -0
- package/dist/executor/simple-select.d.ts +10 -0
- package/dist/executor/simple-select.d.ts.map +1 -0
- package/dist/executor/triggers.d.ts +12 -0
- package/dist/executor/triggers.d.ts.map +1 -0
- package/dist/executor/vtable.d.ts +13 -0
- package/dist/executor/vtable.d.ts.map +1 -0
- package/dist/expressions/context.d.ts +28 -0
- package/dist/expressions/context.d.ts.map +1 -0
- package/dist/expressions/eval.d.ts +5 -0
- package/dist/expressions/eval.d.ts.map +1 -0
- package/dist/expressions/index.d.ts +4 -0
- package/dist/expressions/index.d.ts.map +1 -0
- package/dist/expressions/like.d.ts +5 -0
- package/dist/expressions/like.d.ts.map +1 -0
- package/dist/functions/aggregate.d.ts +9 -0
- package/dist/functions/aggregate.d.ts.map +1 -0
- package/dist/functions/datetime.d.ts +3 -0
- package/dist/functions/datetime.d.ts.map +1 -0
- package/dist/functions/extensions.d.ts +8 -0
- package/dist/functions/extensions.d.ts.map +1 -0
- package/dist/functions/index.d.ts +9 -0
- package/dist/functions/index.d.ts.map +1 -0
- package/dist/functions/json.d.ts +7 -0
- package/dist/functions/json.d.ts.map +1 -0
- package/dist/functions/math.d.ts +3 -0
- package/dist/functions/math.d.ts.map +1 -0
- package/dist/functions/registry.d.ts +38 -0
- package/dist/functions/registry.d.ts.map +1 -0
- package/dist/functions/scalar.d.ts +10 -0
- package/dist/functions/scalar.d.ts.map +1 -0
- package/dist/functions/table-valued.d.ts +9 -0
- package/dist/functions/table-valued.d.ts.map +1 -0
- package/dist/functions/window.d.ts +24 -0
- package/dist/functions/window.d.ts.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12204 -0
- package/dist/index.js.map +7 -0
- package/dist/indexes/index.d.ts +16 -0
- package/dist/indexes/index.d.ts.map +1 -0
- package/dist/json/index.d.ts +8 -0
- package/dist/json/index.d.ts.map +1 -0
- package/dist/json/jsonb.d.ts +43 -0
- package/dist/json/jsonb.d.ts.map +1 -0
- package/dist/json/ops.d.ts +19 -0
- package/dist/json/ops.d.ts.map +1 -0
- package/dist/json/parse.d.ts +14 -0
- package/dist/json/parse.d.ts.map +1 -0
- package/dist/json/path.d.ts +27 -0
- package/dist/json/path.d.ts.map +1 -0
- package/dist/json/stringify.d.ts +5 -0
- package/dist/json/stringify.d.ts.map +1 -0
- package/dist/json/tvf.d.ts +14 -0
- package/dist/json/tvf.d.ts.map +1 -0
- package/dist/json/types.d.ts +30 -0
- package/dist/json/types.d.ts.map +1 -0
- package/dist/lexer/tokenize.d.ts +17 -0
- package/dist/lexer/tokenize.d.ts.map +1 -0
- package/dist/parser/index.d.ts +5 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/parser.d.ts +104 -0
- package/dist/parser/parser.d.ts.map +1 -0
- package/dist/planner/access.d.ts +43 -0
- package/dist/planner/access.d.ts.map +1 -0
- package/dist/planner/index.d.ts +4 -0
- package/dist/planner/index.d.ts.map +1 -0
- package/dist/runtime/clock.d.ts +6 -0
- package/dist/runtime/clock.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +4 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/options.d.ts +19 -0
- package/dist/runtime/options.d.ts.map +1 -0
- package/dist/runtime/prng.d.ts +20 -0
- package/dist/runtime/prng.d.ts.map +1 -0
- package/dist/schema/catalog.d.ts +15 -0
- package/dist/schema/catalog.d.ts.map +1 -0
- package/dist/serialization/codec.d.ts +12 -0
- package/dist/serialization/codec.d.ts.map +1 -0
- package/dist/serialization/index.d.ts +2 -0
- package/dist/serialization/index.d.ts.map +1 -0
- package/dist/storage/database-state.d.ts +86 -0
- package/dist/storage/database-state.d.ts.map +1 -0
- package/dist/storage/index.d.ts +7 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/row.d.ts +11 -0
- package/dist/storage/row.d.ts.map +1 -0
- package/dist/storage/table.d.ts +90 -0
- package/dist/storage/table.d.ts.map +1 -0
- package/dist/transactions/manager.d.ts +20 -0
- package/dist/transactions/manager.d.ts.map +1 -0
- package/dist/types/collation.d.ts +5 -0
- package/dist/types/collation.d.ts.map +1 -0
- package/dist/types/value.d.ts +52 -0
- package/dist/types/value.d.ts.map +1 -0
- package/dist/vtable/fts/options.d.ts +35 -0
- package/dist/vtable/fts/options.d.ts.map +1 -0
- package/dist/vtable/fts/porter.d.ts +3 -0
- package/dist/vtable/fts/porter.d.ts.map +1 -0
- package/dist/vtable/fts/query.d.ts +40 -0
- package/dist/vtable/fts/query.d.ts.map +1 -0
- package/dist/vtable/fts/table.d.ts +80 -0
- package/dist/vtable/fts/table.d.ts.map +1 -0
- package/dist/vtable/fts/tokenize.d.ts +21 -0
- package/dist/vtable/fts/tokenize.d.ts.map +1 -0
- package/dist/vtable/fts5.d.ts +2 -0
- package/dist/vtable/fts5.d.ts.map +1 -0
- package/dist/vtable/index.d.ts +3 -0
- package/dist/vtable/index.d.ts.map +1 -0
- package/dist/vtable/modules.d.ts +66 -0
- package/dist/vtable/modules.d.ts.map +1 -0
- package/package.json +107 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Clock, type DatabaseOptions, Prng } from "../runtime/index.ts";
|
|
2
|
+
import { DatabaseState } from "../storage/database-state.ts";
|
|
3
|
+
import { TransactionManager } from "../transactions/manager.ts";
|
|
4
|
+
import { Statement } from "./statement.ts";
|
|
5
|
+
export declare class Database {
|
|
6
|
+
readonly state: DatabaseState;
|
|
7
|
+
readonly seed: number | bigint;
|
|
8
|
+
readonly prng: Prng;
|
|
9
|
+
now: Clock;
|
|
10
|
+
readonly transactions: TransactionManager;
|
|
11
|
+
private closed;
|
|
12
|
+
private transactionSequence;
|
|
13
|
+
constructor(options?: DatabaseOptions);
|
|
14
|
+
exec(sql: string, params?: unknown[]): void;
|
|
15
|
+
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): T[];
|
|
16
|
+
prepare(sql: string): Statement;
|
|
17
|
+
transaction<T>(fn: () => T): T;
|
|
18
|
+
snapshot(): Uint8Array;
|
|
19
|
+
restore(snapshot: Uint8Array): void;
|
|
20
|
+
close(): void;
|
|
21
|
+
get changes(): number;
|
|
22
|
+
get lastInsertRowid(): number | bigint;
|
|
23
|
+
assertOpen(): void;
|
|
24
|
+
}
|
|
25
|
+
export type { DatabaseOptions };
|
|
26
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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27 @@
|
|
|
1
|
+
import type { Statement as AstStatement } from "../ast/nodes.ts";
|
|
2
|
+
import { ExecutionEnv } from "../executor/env.ts";
|
|
3
|
+
import type { ResultSet } from "../executor/result.ts";
|
|
4
|
+
import type { Database } from "./database.ts";
|
|
5
|
+
export declare class Statement {
|
|
6
|
+
private readonly database;
|
|
7
|
+
private readonly sql;
|
|
8
|
+
private readonly statements;
|
|
9
|
+
private bound;
|
|
10
|
+
private namedPlan;
|
|
11
|
+
private env;
|
|
12
|
+
constructor(database: Database, sql: string, statements: AstStatement[]);
|
|
13
|
+
bind(...params: unknown[]): Statement;
|
|
14
|
+
run(...params: unknown[]): {
|
|
15
|
+
changes: number;
|
|
16
|
+
lastInsertRowid: number | bigint;
|
|
17
|
+
};
|
|
18
|
+
all<T>(...params: unknown[]): T[];
|
|
19
|
+
/** Full result including column names (needed for empty result-set metadata). */
|
|
20
|
+
result(...params: unknown[]): ResultSet;
|
|
21
|
+
get<T>(...params: unknown[]): T | undefined;
|
|
22
|
+
private execute;
|
|
23
|
+
private obtainEnv;
|
|
24
|
+
private bindNamed;
|
|
25
|
+
}
|
|
26
|
+
export declare function bindNamedParameters(env: ExecutionEnv, sql: string, params: readonly unknown[]): void;
|
|
27
|
+
//# sourceMappingURL=statement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statement.d.ts","sourceRoot":"","sources":["../../src/api/statement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,qBAAa,SAAS;IAMlB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAP7B,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,SAAS,CAAuD;IACxE,OAAO,CAAC,GAAG,CAA6B;gBAGrB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,YAAY,EAAE;IAG7C,IAAI,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS;IAKrC,GAAG,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAKhF,GAAG,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE;IAIjC,iFAAiF;IACjF,MAAM,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS;IAIvC,GAAG,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,SAAS;IAI3C,OAAO,CAAC,OAAO;IAiBf,OAAO,CAAC,SAAS;IAgBjB,OAAO,CAAC,SAAS;CAMlB;AA4BD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAKpG"}
|
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
import type { SqlValue } from "../types/value.ts";
|
|
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
|
+
export type UnaryOp = "+" | "-" | "~" | "NOT";
|
|
4
|
+
export type Expr = LiteralExpr | NullExpr | ColumnRefExpr | UnaryExpr | BinaryExpr | BetweenExpr | InExpr | LikeExpr | FunctionExpr | AggregateExpr | WindowExpr | CaseExpr | CastExpr | ExistsExpr | SubqueryExpr | ParameterExpr | RowExpr | CollateExpr;
|
|
5
|
+
export interface LiteralExpr {
|
|
6
|
+
type: "literal";
|
|
7
|
+
value: SqlValue;
|
|
8
|
+
/** True when the literal was written with float syntax (e.g. 1.0) or must be REAL. */
|
|
9
|
+
forceReal?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface NullExpr {
|
|
12
|
+
type: "null";
|
|
13
|
+
}
|
|
14
|
+
export interface ColumnRefExpr {
|
|
15
|
+
type: "column";
|
|
16
|
+
table: string | null;
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
export interface UnaryExpr {
|
|
20
|
+
type: "unary";
|
|
21
|
+
op: UnaryOp;
|
|
22
|
+
expr: Expr;
|
|
23
|
+
}
|
|
24
|
+
export interface BinaryExpr {
|
|
25
|
+
type: "binary";
|
|
26
|
+
op: BinaryOp;
|
|
27
|
+
left: Expr;
|
|
28
|
+
right: Expr;
|
|
29
|
+
}
|
|
30
|
+
export interface BetweenExpr {
|
|
31
|
+
type: "between";
|
|
32
|
+
not: boolean;
|
|
33
|
+
expr: Expr;
|
|
34
|
+
lower: Expr;
|
|
35
|
+
upper: Expr;
|
|
36
|
+
}
|
|
37
|
+
export interface InExpr {
|
|
38
|
+
type: "in";
|
|
39
|
+
not: boolean;
|
|
40
|
+
expr: Expr;
|
|
41
|
+
values: Expr[] | SelectStmt;
|
|
42
|
+
}
|
|
43
|
+
export interface LikeExpr {
|
|
44
|
+
type: "like";
|
|
45
|
+
not: boolean;
|
|
46
|
+
op: "LIKE" | "GLOB";
|
|
47
|
+
expr: Expr;
|
|
48
|
+
pattern: Expr;
|
|
49
|
+
escape: Expr | null;
|
|
50
|
+
}
|
|
51
|
+
export interface FunctionExpr {
|
|
52
|
+
type: "function";
|
|
53
|
+
name: string;
|
|
54
|
+
distinct: boolean;
|
|
55
|
+
args: Expr[] | "*";
|
|
56
|
+
filter: Expr | null;
|
|
57
|
+
}
|
|
58
|
+
export interface AggregateExpr {
|
|
59
|
+
type: "aggregate";
|
|
60
|
+
name: string;
|
|
61
|
+
distinct: boolean;
|
|
62
|
+
args: Expr[] | "*";
|
|
63
|
+
filter: Expr | null;
|
|
64
|
+
}
|
|
65
|
+
export interface WindowExpr {
|
|
66
|
+
type: "window";
|
|
67
|
+
func: FunctionExpr | AggregateExpr;
|
|
68
|
+
window: WindowSpec;
|
|
69
|
+
}
|
|
70
|
+
export interface WindowSpec {
|
|
71
|
+
partitionBy: Expr[];
|
|
72
|
+
orderBy: OrderByItem[];
|
|
73
|
+
frame: FrameSpec | null;
|
|
74
|
+
/** Named window reference for `OVER window_name`. */
|
|
75
|
+
ref?: string | null;
|
|
76
|
+
}
|
|
77
|
+
export interface FrameSpec {
|
|
78
|
+
type: "ROWS" | "RANGE" | "GROUPS";
|
|
79
|
+
start: FrameBound;
|
|
80
|
+
end: FrameBound;
|
|
81
|
+
}
|
|
82
|
+
export type FrameBound = {
|
|
83
|
+
kind: "unbounded_preceding";
|
|
84
|
+
} | {
|
|
85
|
+
kind: "unbounded_following";
|
|
86
|
+
} | {
|
|
87
|
+
kind: "current_row";
|
|
88
|
+
} | {
|
|
89
|
+
kind: "preceding";
|
|
90
|
+
expr: Expr;
|
|
91
|
+
} | {
|
|
92
|
+
kind: "following";
|
|
93
|
+
expr: Expr;
|
|
94
|
+
};
|
|
95
|
+
export interface CaseExpr {
|
|
96
|
+
type: "case";
|
|
97
|
+
base: Expr | null;
|
|
98
|
+
whens: {
|
|
99
|
+
when: Expr;
|
|
100
|
+
then: Expr;
|
|
101
|
+
}[];
|
|
102
|
+
else: Expr | null;
|
|
103
|
+
}
|
|
104
|
+
export interface CastExpr {
|
|
105
|
+
type: "cast";
|
|
106
|
+
expr: Expr;
|
|
107
|
+
typeName: string;
|
|
108
|
+
}
|
|
109
|
+
export interface ExistsExpr {
|
|
110
|
+
type: "exists";
|
|
111
|
+
not: boolean;
|
|
112
|
+
select: SelectStmt;
|
|
113
|
+
}
|
|
114
|
+
export interface SubqueryExpr {
|
|
115
|
+
type: "subquery";
|
|
116
|
+
select: SelectStmt;
|
|
117
|
+
}
|
|
118
|
+
export interface ParameterExpr {
|
|
119
|
+
type: "parameter";
|
|
120
|
+
/** 1-based positional index, or named key */
|
|
121
|
+
name: string | number;
|
|
122
|
+
}
|
|
123
|
+
export interface RowExpr {
|
|
124
|
+
type: "row";
|
|
125
|
+
values: Expr[];
|
|
126
|
+
}
|
|
127
|
+
export interface CollateExpr {
|
|
128
|
+
type: "collate";
|
|
129
|
+
expr: Expr;
|
|
130
|
+
collation: string;
|
|
131
|
+
}
|
|
132
|
+
export interface OrderByItem {
|
|
133
|
+
expr: Expr;
|
|
134
|
+
dir: "ASC" | "DESC";
|
|
135
|
+
nulls: "FIRST" | "LAST" | null;
|
|
136
|
+
}
|
|
137
|
+
export interface LimitClause {
|
|
138
|
+
limit: Expr;
|
|
139
|
+
offset: Expr | null;
|
|
140
|
+
}
|
|
141
|
+
export type Statement = SelectStmt | InsertStmt | UpdateStmt | DeleteStmt | CreateTableStmt | DropTableStmt | AlterTableStmt | CreateIndexStmt | DropIndexStmt | CreateViewStmt | DropViewStmt | CreateTriggerStmt | DropTriggerStmt | BeginStmt | CommitStmt | RollbackStmt | SavepointStmt | ReleaseStmt | PragmaStmt | AttachStmt | DetachStmt | CreateVirtualTableStmt | ExplainStmt | AnalyzeStmt | ReindexStmt | VacuumStmt;
|
|
142
|
+
export interface AnalyzeStmt {
|
|
143
|
+
type: "analyze";
|
|
144
|
+
schema: string | null;
|
|
145
|
+
name: string | null;
|
|
146
|
+
}
|
|
147
|
+
export interface ReindexStmt {
|
|
148
|
+
type: "reindex";
|
|
149
|
+
schema: string | null;
|
|
150
|
+
name: string | null;
|
|
151
|
+
}
|
|
152
|
+
export interface VacuumStmt {
|
|
153
|
+
type: "vacuum";
|
|
154
|
+
schema: string | null;
|
|
155
|
+
into: string | null;
|
|
156
|
+
}
|
|
157
|
+
export interface SelectStmt {
|
|
158
|
+
type: "select";
|
|
159
|
+
with: WithClause | null;
|
|
160
|
+
distinct: boolean;
|
|
161
|
+
columns: ResultColumn[];
|
|
162
|
+
from: FromItem | null;
|
|
163
|
+
where: Expr | null;
|
|
164
|
+
groupBy: Expr[];
|
|
165
|
+
having: Expr | null;
|
|
166
|
+
windows: {
|
|
167
|
+
name: string;
|
|
168
|
+
spec: WindowSpec;
|
|
169
|
+
}[];
|
|
170
|
+
orderBy: OrderByItem[];
|
|
171
|
+
limit: LimitClause | null;
|
|
172
|
+
compound: CompoundTail | null;
|
|
173
|
+
}
|
|
174
|
+
export interface CompoundTail {
|
|
175
|
+
op: "UNION" | "UNION ALL" | "INTERSECT" | "EXCEPT";
|
|
176
|
+
select: SelectStmt;
|
|
177
|
+
}
|
|
178
|
+
export interface WithClause {
|
|
179
|
+
recursive: boolean;
|
|
180
|
+
ctes: Cte[];
|
|
181
|
+
}
|
|
182
|
+
export interface Cte {
|
|
183
|
+
name: string;
|
|
184
|
+
columns: string[] | null;
|
|
185
|
+
select: SelectStmt;
|
|
186
|
+
}
|
|
187
|
+
export type ResultColumn = {
|
|
188
|
+
type: "star";
|
|
189
|
+
table: string | null;
|
|
190
|
+
} | {
|
|
191
|
+
type: "expr";
|
|
192
|
+
expr: Expr;
|
|
193
|
+
alias: string | null;
|
|
194
|
+
};
|
|
195
|
+
export type FromItem = TableRef | JoinFrom | SubqueryFrom | TableFuncFrom;
|
|
196
|
+
export interface TableRef {
|
|
197
|
+
type: "table";
|
|
198
|
+
schema: string | null;
|
|
199
|
+
name: string;
|
|
200
|
+
alias: string | null;
|
|
201
|
+
}
|
|
202
|
+
export interface SubqueryFrom {
|
|
203
|
+
type: "subquery";
|
|
204
|
+
select: SelectStmt;
|
|
205
|
+
alias: string;
|
|
206
|
+
}
|
|
207
|
+
export interface TableFuncFrom {
|
|
208
|
+
type: "table_func";
|
|
209
|
+
name: string;
|
|
210
|
+
args: Expr[];
|
|
211
|
+
alias: string | null;
|
|
212
|
+
}
|
|
213
|
+
export interface JoinFrom {
|
|
214
|
+
type: "join";
|
|
215
|
+
left: FromItem;
|
|
216
|
+
right: FromItem;
|
|
217
|
+
joinType: "CROSS" | "INNER" | "LEFT" | "RIGHT" | "FULL";
|
|
218
|
+
on: Expr | null;
|
|
219
|
+
using: string[] | null;
|
|
220
|
+
}
|
|
221
|
+
export interface InsertStmt {
|
|
222
|
+
type: "insert";
|
|
223
|
+
with: WithClause | null;
|
|
224
|
+
mode: "insert" | "replace" | "insert_or_replace" | "insert_or_ignore" | "insert_or_abort" | "insert_or_rollback" | "insert_or_fail";
|
|
225
|
+
table: string;
|
|
226
|
+
columns: string[] | null;
|
|
227
|
+
values: Expr[][] | null;
|
|
228
|
+
select: SelectStmt | null;
|
|
229
|
+
upsert: UpsertClause | null;
|
|
230
|
+
returning: ResultColumn[];
|
|
231
|
+
}
|
|
232
|
+
export interface UpsertClause {
|
|
233
|
+
targetColumns: string[] | null;
|
|
234
|
+
targetWhere: Expr | null;
|
|
235
|
+
action: "nothing" | {
|
|
236
|
+
set: SetItem[];
|
|
237
|
+
where: Expr | null;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
export interface SetItem {
|
|
241
|
+
columns: string[];
|
|
242
|
+
expr: Expr;
|
|
243
|
+
}
|
|
244
|
+
export interface UpdateStmt {
|
|
245
|
+
type: "update";
|
|
246
|
+
with: WithClause | null;
|
|
247
|
+
or: "replace" | "ignore" | "abort" | "rollback" | "fail" | null;
|
|
248
|
+
table: string;
|
|
249
|
+
alias: string | null;
|
|
250
|
+
set: SetItem[];
|
|
251
|
+
from: FromItem | null;
|
|
252
|
+
where: Expr | null;
|
|
253
|
+
returning: ResultColumn[];
|
|
254
|
+
}
|
|
255
|
+
export interface DeleteStmt {
|
|
256
|
+
type: "delete";
|
|
257
|
+
with: WithClause | null;
|
|
258
|
+
table: string;
|
|
259
|
+
alias: string | null;
|
|
260
|
+
where: Expr | null;
|
|
261
|
+
returning: ResultColumn[];
|
|
262
|
+
}
|
|
263
|
+
export interface CreateTableStmt {
|
|
264
|
+
type: "create_table";
|
|
265
|
+
ifNotExists: boolean;
|
|
266
|
+
temp: boolean;
|
|
267
|
+
name: string;
|
|
268
|
+
columns: ColumnDef[];
|
|
269
|
+
constraints: TableConstraint[];
|
|
270
|
+
asSelect: SelectStmt | null;
|
|
271
|
+
withoutRowid: boolean;
|
|
272
|
+
}
|
|
273
|
+
export interface ColumnDef {
|
|
274
|
+
name: string;
|
|
275
|
+
typeName: string | null;
|
|
276
|
+
constraints: ColumnConstraint[];
|
|
277
|
+
}
|
|
278
|
+
export type ColumnConstraint = {
|
|
279
|
+
type: "primary_key";
|
|
280
|
+
order: "ASC" | "DESC" | null;
|
|
281
|
+
autoincrement: boolean;
|
|
282
|
+
conflict: ConflictAction | null;
|
|
283
|
+
} | {
|
|
284
|
+
type: "not_null";
|
|
285
|
+
conflict: ConflictAction | null;
|
|
286
|
+
} | {
|
|
287
|
+
type: "unique";
|
|
288
|
+
conflict: ConflictAction | null;
|
|
289
|
+
} | {
|
|
290
|
+
type: "check";
|
|
291
|
+
expr: Expr;
|
|
292
|
+
} | {
|
|
293
|
+
type: "default";
|
|
294
|
+
expr: Expr;
|
|
295
|
+
} | {
|
|
296
|
+
type: "collate";
|
|
297
|
+
name: string;
|
|
298
|
+
} | {
|
|
299
|
+
type: "references";
|
|
300
|
+
table: string;
|
|
301
|
+
columns: string[] | null;
|
|
302
|
+
onDelete: FkAction | null;
|
|
303
|
+
onUpdate: FkAction | null;
|
|
304
|
+
} | {
|
|
305
|
+
type: "generated";
|
|
306
|
+
expr: Expr;
|
|
307
|
+
stored: boolean;
|
|
308
|
+
};
|
|
309
|
+
export type TableConstraint = {
|
|
310
|
+
type: "primary_key";
|
|
311
|
+
columns: IndexedColumn[];
|
|
312
|
+
conflict: ConflictAction | null;
|
|
313
|
+
} | {
|
|
314
|
+
type: "unique";
|
|
315
|
+
columns: IndexedColumn[];
|
|
316
|
+
conflict: ConflictAction | null;
|
|
317
|
+
name: string | null;
|
|
318
|
+
} | {
|
|
319
|
+
type: "check";
|
|
320
|
+
expr: Expr;
|
|
321
|
+
name: string | null;
|
|
322
|
+
} | {
|
|
323
|
+
type: "foreign_key";
|
|
324
|
+
columns: string[];
|
|
325
|
+
refTable: string;
|
|
326
|
+
refColumns: string[] | null;
|
|
327
|
+
onDelete: FkAction | null;
|
|
328
|
+
onUpdate: FkAction | null;
|
|
329
|
+
name: string | null;
|
|
330
|
+
};
|
|
331
|
+
export interface IndexedColumn {
|
|
332
|
+
name: string;
|
|
333
|
+
collate: string | null;
|
|
334
|
+
order: "ASC" | "DESC" | null;
|
|
335
|
+
}
|
|
336
|
+
export type ConflictAction = "ROLLBACK" | "ABORT" | "FAIL" | "IGNORE" | "REPLACE";
|
|
337
|
+
export type FkAction = "SET NULL" | "SET DEFAULT" | "CASCADE" | "RESTRICT" | "NO ACTION";
|
|
338
|
+
export interface DropTableStmt {
|
|
339
|
+
type: "drop_table";
|
|
340
|
+
ifExists: boolean;
|
|
341
|
+
name: string;
|
|
342
|
+
}
|
|
343
|
+
export interface AlterTableStmt {
|
|
344
|
+
type: "alter_table";
|
|
345
|
+
table: string;
|
|
346
|
+
action: {
|
|
347
|
+
kind: "rename_table";
|
|
348
|
+
newName: string;
|
|
349
|
+
} | {
|
|
350
|
+
kind: "rename_column";
|
|
351
|
+
oldName: string;
|
|
352
|
+
newName: string;
|
|
353
|
+
} | {
|
|
354
|
+
kind: "add_column";
|
|
355
|
+
column: ColumnDef;
|
|
356
|
+
} | {
|
|
357
|
+
kind: "drop_column";
|
|
358
|
+
name: string;
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
export interface CreateIndexStmt {
|
|
362
|
+
type: "create_index";
|
|
363
|
+
unique: boolean;
|
|
364
|
+
ifNotExists: boolean;
|
|
365
|
+
name: string;
|
|
366
|
+
table: string;
|
|
367
|
+
columns: IndexedColumn[];
|
|
368
|
+
where: Expr | null;
|
|
369
|
+
}
|
|
370
|
+
export interface DropIndexStmt {
|
|
371
|
+
type: "drop_index";
|
|
372
|
+
ifExists: boolean;
|
|
373
|
+
name: string;
|
|
374
|
+
}
|
|
375
|
+
export interface CreateViewStmt {
|
|
376
|
+
type: "create_view";
|
|
377
|
+
ifNotExists: boolean;
|
|
378
|
+
temp: boolean;
|
|
379
|
+
name: string;
|
|
380
|
+
columns: string[] | null;
|
|
381
|
+
select: SelectStmt;
|
|
382
|
+
}
|
|
383
|
+
export interface DropViewStmt {
|
|
384
|
+
type: "drop_view";
|
|
385
|
+
ifExists: boolean;
|
|
386
|
+
name: string;
|
|
387
|
+
}
|
|
388
|
+
export interface CreateTriggerStmt {
|
|
389
|
+
type: "create_trigger";
|
|
390
|
+
ifNotExists: boolean;
|
|
391
|
+
temp: boolean;
|
|
392
|
+
name: string;
|
|
393
|
+
timing: "BEFORE" | "AFTER" | "INSTEAD";
|
|
394
|
+
event: "INSERT" | "UPDATE" | "DELETE";
|
|
395
|
+
table: string;
|
|
396
|
+
updateColumns: string[] | null;
|
|
397
|
+
forEachRow: boolean;
|
|
398
|
+
when: Expr | null;
|
|
399
|
+
body: Statement[];
|
|
400
|
+
}
|
|
401
|
+
export interface DropTriggerStmt {
|
|
402
|
+
type: "drop_trigger";
|
|
403
|
+
ifExists: boolean;
|
|
404
|
+
name: string;
|
|
405
|
+
}
|
|
406
|
+
export interface CreateVirtualTableStmt {
|
|
407
|
+
type: "create_virtual_table";
|
|
408
|
+
ifNotExists: boolean;
|
|
409
|
+
name: string;
|
|
410
|
+
module: string;
|
|
411
|
+
moduleArgs: string[];
|
|
412
|
+
}
|
|
413
|
+
export interface BeginStmt {
|
|
414
|
+
type: "begin";
|
|
415
|
+
mode: "DEFERRED" | "IMMEDIATE" | "EXCLUSIVE" | null;
|
|
416
|
+
}
|
|
417
|
+
export interface CommitStmt {
|
|
418
|
+
type: "commit";
|
|
419
|
+
}
|
|
420
|
+
export interface RollbackStmt {
|
|
421
|
+
type: "rollback";
|
|
422
|
+
savepoint: string | null;
|
|
423
|
+
}
|
|
424
|
+
export interface SavepointStmt {
|
|
425
|
+
type: "savepoint";
|
|
426
|
+
name: string;
|
|
427
|
+
}
|
|
428
|
+
export interface ReleaseStmt {
|
|
429
|
+
type: "release";
|
|
430
|
+
name: string;
|
|
431
|
+
}
|
|
432
|
+
export interface PragmaStmt {
|
|
433
|
+
type: "pragma";
|
|
434
|
+
name: string;
|
|
435
|
+
value: Expr | null;
|
|
436
|
+
}
|
|
437
|
+
export interface AttachStmt {
|
|
438
|
+
type: "attach";
|
|
439
|
+
filename: Expr;
|
|
440
|
+
schema: string;
|
|
441
|
+
}
|
|
442
|
+
export interface DetachStmt {
|
|
443
|
+
type: "detach";
|
|
444
|
+
schema: string;
|
|
445
|
+
}
|
|
446
|
+
export interface ExplainStmt {
|
|
447
|
+
type: "explain";
|
|
448
|
+
queryPlan: boolean;
|
|
449
|
+
statement: Statement;
|
|
450
|
+
}
|
|
451
|
+
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../src/ast/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,MAAM,QAAQ,GAChB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,GAAG,GACH,IAAI,GACJ,GAAG,GACH,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,QAAQ,GACR,kBAAkB,GAClB,sBAAsB,GACtB,MAAM,GACN,UAAU,GACV,MAAM,GACN,UAAU,GACV,IAAI,GACJ,QAAQ,GACR,OAAO,GACP,IAAI,GACJ,KAA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ore } from "../indexes/index.ts";
|
|
3
|
+
import type { Row, Rowid } from "../storage/row.ts";
|
|
4
|
+
import type { ColumnInfo, Table } from "../storage/table.ts";
|
|
5
|
+
import type { SqlValue } from "../types/value.ts";
|
|
6
|
+
export type CheckEvaluator = (expr: Expr, row: Row) => SqlValue;
|
|
7
|
+
export declare function checkNotNull(columns: readonly ColumnInfo[], row: Row, tableName?: string): void;
|
|
8
|
+
export declare function checkPrimaryKey(columns: readonly ColumnInfo[], row: Row, tableName?: string): void;
|
|
9
|
+
export declare function checkUnique(index: IndexStore, values: readonly SqlValue[], rowid?: Rowid): void;
|
|
10
|
+
export declare function checkExpressions(expressions: readonly Expr[], row: Row, evaluate: CheckEvaluator, constraintName?: string): void;
|
|
11
|
+
export declare function checkTableConstraints(table: Table, row: Row, evaluate: CheckEvaluator): void;
|
|
12
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/constraints/check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,KAAK,QAAQ,CAAC;AAEhE,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,SAAU,GAAG,IAAI,CAWhG;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,SAAU,GAAG,IAAI,CAWnG;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,QAAQ,EAAE,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAE/F;AAED,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,SAAS,IAAI,EAAE,EAC5B,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,cAAc,EACxB,cAAc,SAAU,GACvB,IAAI,CAWN;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI,CAO5F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
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";
|
|
2
|
+
export declare class SqliteError extends Error {
|
|
3
|
+
readonly category: ErrorCategory;
|
|
4
|
+
readonly sqliteCode?: string;
|
|
5
|
+
constructor(message: string, category?: ErrorCategory, sqliteCode?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare function unsupported(feature: string): never;
|
|
8
|
+
export declare class TriggerRaiseError extends SqliteError {
|
|
9
|
+
readonly action: "IGNORE" | "ABORT" | "FAIL" | "ROLLBACK";
|
|
10
|
+
constructor(action: "IGNORE" | "ABORT" | "FAIL" | "ROLLBACK", message?: string);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,QAAQ,GACR,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,kBAAkB,GAClB,oBAAoB,GACpB,YAAY,GACZ,aAAa,GACb,mBAAmB,GACnB,aAAa,GACb,QAAQ,GACR,OAAO,CAAC;AAEZ,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;gBAEjB,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,aAAuB,EAAE,UAAU,CAAC,EAAE,MAAM;CAMpF;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAElD;AAED,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;gBAE9C,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM;CAQ/E"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AttachStmt, DetachStmt } from "../ast/nodes.ts";
|
|
2
|
+
import type { ExecutionEnv } from "./env.ts";
|
|
3
|
+
import { type ResultSet } from "./result.ts";
|
|
4
|
+
export declare function executeAttach(stmt: AttachStmt, env: ExecutionEnv): ResultSet;
|
|
5
|
+
export declare function executeDetach(stmt: DetachStmt, env: ExecutionEnv): ResultSet;
|
|
6
|
+
//# sourceMappingURL=attach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../src/executor/attach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE1D,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CAiB5E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CAY5E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AlterTableStmt, CreateIndexStmt, CreateTableStmt, CreateViewStmt, DropIndexStmt, DropTableStmt, DropViewStmt } from "../ast/nodes.ts";
|
|
2
|
+
import type { ExecutionEnv } from "./env.ts";
|
|
3
|
+
import { type ResultSet } from "./result.ts";
|
|
4
|
+
export declare function executeCreateTable(stmt: CreateTableStmt, env: ExecutionEnv): ResultSet;
|
|
5
|
+
export declare function executeCreateIndex(stmt: CreateIndexStmt, env: ExecutionEnv): ResultSet;
|
|
6
|
+
export declare function executeAlterTable(stmt: AlterTableStmt, env: ExecutionEnv): ResultSet;
|
|
7
|
+
export declare function executeDropTable(stmt: DropTableStmt, env: ExecutionEnv): ResultSet;
|
|
8
|
+
export declare function executeDropIndex(stmt: DropIndexStmt, env: ExecutionEnv): ResultSet;
|
|
9
|
+
export declare function executeCreateView(stmt: CreateViewStmt, env: ExecutionEnv): ResultSet;
|
|
10
|
+
export declare function executeDropView(stmt: DropViewStmt, env: ExecutionEnv): ResultSet;
|
|
11
|
+
//# sourceMappingURL=ddl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ddl.d.ts","sourceRoot":"","sources":["../../src/executor/ddl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACb,MAAM,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAe,KAAK,SAAS,EAAgB,MAAM,aAAa,CAAC;AAGxE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CAgCtF;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CA4BtF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CA2FpF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CAGlF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CAGlF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CAGpF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CAGhF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DeleteStmt, InsertStmt, UpdateStmt } from "../ast/nodes.ts";
|
|
2
|
+
import type { ExecutionEnv } from "./env.ts";
|
|
3
|
+
import { type ResultSet } from "./result.ts";
|
|
4
|
+
export declare function executeInsert(stmt: InsertStmt, env: ExecutionEnv): ResultSet;
|
|
5
|
+
export declare function executeUpdate(stmt: UpdateStmt, env: ExecutionEnv): ResultSet;
|
|
6
|
+
export declare function executeDelete(stmt: DeleteStmt, env: ExecutionEnv): ResultSet;
|
|
7
|
+
//# sourceMappingURL=dml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dml.d.ts","sourceRoot":"","sources":["../../src/executor/dml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAiB,UAAU,EAAyB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAWhH,OAAO,KAAK,EAAE,YAAY,EAAY,MAAM,UAAU,CAAC;AACvD,OAAO,EAAe,KAAK,SAAS,EAAgC,MAAM,aAAa,CAAC;AAKxF,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CAuK5E;AA0FD,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CA+D5E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,GAAG,SAAS,CA6B5E"}
|