rado 0.2.27 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/define/Column.d.ts +10 -12
- package/dist/define/Column.js +31 -30
- package/dist/define/Expr.d.ts +7 -9
- package/dist/define/Expr.js +67 -42
- package/dist/define/Query.d.ts +5 -5
- package/dist/define/Query.js +9 -11
- package/dist/define/Table.d.ts +4 -6
- package/dist/define/Table.js +4 -6
- package/dist/define/VirtualTable.d.ts +2 -4
- package/dist/define/VirtualTable.js +2 -3
- package/dist/sqlite/SqliteFunctions.d.ts +2 -2
- package/package.json +1 -1
package/dist/define/Column.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Callable } from '../util/Callable';
|
|
2
2
|
import { EV, Expr, ExprData } from './Expr';
|
|
3
3
|
import { Fields } from './Fields';
|
|
4
|
-
declare const DATA: unique symbol;
|
|
5
|
-
declare const TYPE: unique symbol;
|
|
6
4
|
export declare enum ColumnType {
|
|
7
5
|
String = "String",
|
|
8
6
|
Integer = "Integer",
|
|
@@ -26,12 +24,12 @@ export interface ColumnData extends PartialColumnData {
|
|
|
26
24
|
name: string;
|
|
27
25
|
}
|
|
28
26
|
export interface Column<T> {
|
|
29
|
-
[
|
|
30
|
-
[
|
|
27
|
+
[Column.Type]: T;
|
|
28
|
+
[Column.Data]: PartialColumnData;
|
|
31
29
|
}
|
|
32
30
|
export declare namespace Column {
|
|
33
|
-
const Data:
|
|
34
|
-
const Type:
|
|
31
|
+
const Data: unique symbol;
|
|
32
|
+
const Type: unique symbol;
|
|
35
33
|
const IsOptional: unique symbol;
|
|
36
34
|
const IsNullable: unique symbol;
|
|
37
35
|
const IsPrimary: unique symbol;
|
|
@@ -41,8 +39,8 @@ interface ValueColumn<T> extends Expr<T> {
|
|
|
41
39
|
<X extends T = T>(): ValueColumn<T extends null ? X | null : X>;
|
|
42
40
|
}
|
|
43
41
|
declare class ValueColumn<T> extends Callable implements Column<T> {
|
|
44
|
-
[
|
|
45
|
-
[
|
|
42
|
+
[Column.Type]: T;
|
|
43
|
+
[Column.Data]: PartialColumnData;
|
|
46
44
|
constructor(data: PartialColumnData);
|
|
47
45
|
get nullable(): ValueColumn<T | null>;
|
|
48
46
|
get unique(): ValueColumn<T>;
|
|
@@ -61,8 +59,8 @@ interface ObjectColumn<T> {
|
|
|
61
59
|
<X extends T = T>(): Column<T extends null ? X | null : X> & Fields<X>;
|
|
62
60
|
}
|
|
63
61
|
declare class ObjectColumn<T> extends Callable implements Column<T> {
|
|
64
|
-
[
|
|
65
|
-
[
|
|
62
|
+
[Column.Type]: T;
|
|
63
|
+
[Column.Data]: PartialColumnData;
|
|
66
64
|
constructor(data: PartialColumnData);
|
|
67
65
|
get nullable(): ObjectColumn<T | null>;
|
|
68
66
|
get unique(): ObjectColumn<T>;
|
|
@@ -79,7 +77,7 @@ interface UnTyped {
|
|
|
79
77
|
(name: string): UnTyped;
|
|
80
78
|
}
|
|
81
79
|
declare class UnTyped extends Callable {
|
|
82
|
-
[
|
|
80
|
+
[Column.Data]: PartialColumnData;
|
|
83
81
|
constructor(data?: PartialColumnData);
|
|
84
82
|
get nullable(): NullableUnTyped;
|
|
85
83
|
get unique(): UnTyped;
|
|
@@ -92,7 +90,7 @@ declare class UnTyped extends Callable {
|
|
|
92
90
|
get array(): ValueColumn<any[]>;
|
|
93
91
|
}
|
|
94
92
|
declare class NullableUnTyped {
|
|
95
|
-
[
|
|
93
|
+
[Column.Data]: PartialColumnData;
|
|
96
94
|
get unique(): UnTyped;
|
|
97
95
|
get string(): ValueColumn<string | null>;
|
|
98
96
|
get integer(): ValueColumn<number | null>;
|
package/dist/define/Column.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// src/define/Column.ts
|
|
2
2
|
import { Callable } from "../util/Callable.js";
|
|
3
3
|
import { Expr, ExprData } from "./Expr.js";
|
|
4
|
-
var DATA = Symbol("Column.Data");
|
|
5
|
-
var TYPE = Symbol("Column.Type");
|
|
6
4
|
var ColumnType = /* @__PURE__ */ ((ColumnType2) => {
|
|
7
5
|
ColumnType2["String"] = "String";
|
|
8
6
|
ColumnType2["Integer"] = "Integer";
|
|
@@ -13,38 +11,38 @@ var ColumnType = /* @__PURE__ */ ((ColumnType2) => {
|
|
|
13
11
|
})(ColumnType || {});
|
|
14
12
|
var Column;
|
|
15
13
|
((Column2) => {
|
|
16
|
-
Column2.Data =
|
|
17
|
-
Column2.Type =
|
|
14
|
+
Column2.Data = Symbol("Column.Data");
|
|
15
|
+
Column2.Type = Symbol("Column.Type");
|
|
18
16
|
function isColumn(input) {
|
|
19
|
-
return Boolean(input[
|
|
17
|
+
return Boolean(input[Column2.Data]);
|
|
20
18
|
}
|
|
21
19
|
Column2.isColumn = isColumn;
|
|
22
20
|
})(Column || (Column = {}));
|
|
23
21
|
var ValueColumn = class extends Callable {
|
|
24
|
-
[
|
|
22
|
+
[Column.Data];
|
|
25
23
|
constructor(data) {
|
|
26
24
|
super(() => this);
|
|
27
|
-
this[
|
|
25
|
+
this[Column.Data] = data;
|
|
28
26
|
}
|
|
29
27
|
get nullable() {
|
|
30
|
-
return new ValueColumn({ ...this[
|
|
28
|
+
return new ValueColumn({ ...this[Column.Data], nullable: true });
|
|
31
29
|
}
|
|
32
30
|
get unique() {
|
|
33
|
-
return new ValueColumn({ ...this[
|
|
31
|
+
return new ValueColumn({ ...this[Column.Data], unique: true });
|
|
34
32
|
}
|
|
35
33
|
get autoIncrement() {
|
|
36
|
-
return new OptionalColumn({ ...this[
|
|
34
|
+
return new OptionalColumn({ ...this[Column.Data], autoIncrement: true });
|
|
37
35
|
}
|
|
38
36
|
primaryKey(create) {
|
|
39
37
|
return new PrimaryColumn({
|
|
40
|
-
...this[
|
|
38
|
+
...this[Column.Data],
|
|
41
39
|
primaryKey: true,
|
|
42
|
-
defaultValue: create ? () => ExprData.create(create()) : this[
|
|
40
|
+
defaultValue: create ? () => ExprData.create(create()) : this[Column.Data].defaultValue
|
|
43
41
|
});
|
|
44
42
|
}
|
|
45
43
|
references(column2) {
|
|
46
44
|
return new ValueColumn({
|
|
47
|
-
...this[
|
|
45
|
+
...this[Column.Data],
|
|
48
46
|
references() {
|
|
49
47
|
return ExprData.create(Expr.isExpr(column2) ? column2 : column2());
|
|
50
48
|
}
|
|
@@ -52,7 +50,7 @@ var ValueColumn = class extends Callable {
|
|
|
52
50
|
}
|
|
53
51
|
default(value) {
|
|
54
52
|
return new OptionalColumn({
|
|
55
|
-
...this[
|
|
53
|
+
...this[Column.Data],
|
|
56
54
|
defaultValue: createDefaultValue(value)
|
|
57
55
|
});
|
|
58
56
|
}
|
|
@@ -67,20 +65,20 @@ var PrimaryColumn = class extends ValueColumn {
|
|
|
67
65
|
[Column.IsPrimary];
|
|
68
66
|
};
|
|
69
67
|
var ObjectColumn = class extends Callable {
|
|
70
|
-
[
|
|
68
|
+
[Column.Data];
|
|
71
69
|
constructor(data) {
|
|
72
70
|
super(() => this);
|
|
73
|
-
this[
|
|
71
|
+
this[Column.Data] = data;
|
|
74
72
|
}
|
|
75
73
|
get nullable() {
|
|
76
|
-
return new ObjectColumn({ ...this[
|
|
74
|
+
return new ObjectColumn({ ...this[Column.Data], nullable: true });
|
|
77
75
|
}
|
|
78
76
|
get unique() {
|
|
79
|
-
return new ObjectColumn({ ...this[
|
|
77
|
+
return new ObjectColumn({ ...this[Column.Data], unique: true });
|
|
80
78
|
}
|
|
81
79
|
defaultValue(value) {
|
|
82
80
|
return new OptionalObjectColumn({
|
|
83
|
-
...this[
|
|
81
|
+
...this[Column.Data],
|
|
84
82
|
defaultValue: createDefaultValue(value)
|
|
85
83
|
});
|
|
86
84
|
}
|
|
@@ -89,58 +87,61 @@ var OptionalObjectColumn = class extends ObjectColumn {
|
|
|
89
87
|
[Column.IsOptional];
|
|
90
88
|
};
|
|
91
89
|
var UnTyped = class extends Callable {
|
|
92
|
-
[
|
|
90
|
+
[Column.Data];
|
|
93
91
|
constructor(data = {}) {
|
|
94
92
|
super((name) => {
|
|
95
93
|
return new ValueColumn({ ...data, name });
|
|
96
94
|
});
|
|
97
|
-
this[
|
|
95
|
+
this[Column.Data] = data;
|
|
98
96
|
}
|
|
99
97
|
get nullable() {
|
|
100
|
-
return new UnTyped({
|
|
98
|
+
return new UnTyped({
|
|
99
|
+
...this[Column.Data],
|
|
100
|
+
nullable: true
|
|
101
|
+
});
|
|
101
102
|
}
|
|
102
103
|
get unique() {
|
|
103
|
-
return new UnTyped({ ...this[
|
|
104
|
+
return new UnTyped({ ...this[Column.Data], unique: true });
|
|
104
105
|
}
|
|
105
106
|
get string() {
|
|
106
107
|
return new ValueColumn({
|
|
107
|
-
...this[
|
|
108
|
+
...this[Column.Data],
|
|
108
109
|
type: "String" /* String */
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
112
|
get integer() {
|
|
112
113
|
return new ValueColumn({
|
|
113
|
-
...this[
|
|
114
|
+
...this[Column.Data],
|
|
114
115
|
type: "Integer" /* Integer */
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
118
|
get number() {
|
|
118
119
|
return new ValueColumn({
|
|
119
|
-
...this[
|
|
120
|
+
...this[Column.Data],
|
|
120
121
|
type: "Number" /* Number */
|
|
121
122
|
});
|
|
122
123
|
}
|
|
123
124
|
get boolean() {
|
|
124
125
|
return new ValueColumn({
|
|
125
|
-
...this[
|
|
126
|
+
...this[Column.Data],
|
|
126
127
|
type: "Boolean" /* Boolean */
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
130
|
get json() {
|
|
130
131
|
return new ValueColumn({
|
|
131
|
-
...this[
|
|
132
|
+
...this[Column.Data],
|
|
132
133
|
type: "Json" /* Json */
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
136
|
get object() {
|
|
136
137
|
return new ObjectColumn({
|
|
137
|
-
...this[
|
|
138
|
+
...this[Column.Data],
|
|
138
139
|
type: "Json" /* Json */
|
|
139
140
|
});
|
|
140
141
|
}
|
|
141
142
|
get array() {
|
|
142
143
|
return new ValueColumn({
|
|
143
|
-
...this[
|
|
144
|
+
...this[Column.Data],
|
|
144
145
|
type: "Json" /* Json */
|
|
145
146
|
});
|
|
146
147
|
}
|
package/dist/define/Expr.d.ts
CHANGED
|
@@ -5,9 +5,6 @@ import { QueryData } from './Query';
|
|
|
5
5
|
import { Selection } from './Selection';
|
|
6
6
|
import { Target } from './Target';
|
|
7
7
|
import { SelectMultiple, SelectSingle } from './query/Select';
|
|
8
|
-
declare const DATA: unique symbol;
|
|
9
|
-
declare const TO_EXPR: unique symbol;
|
|
10
|
-
declare const IS_EXPR: unique symbol;
|
|
11
8
|
export declare enum UnOpType {
|
|
12
9
|
Not = "Not",
|
|
13
10
|
IsNull = "IsNull"
|
|
@@ -119,10 +116,12 @@ export declare namespace ExprData {
|
|
|
119
116
|
}
|
|
120
117
|
/** Expression or value of type T */
|
|
121
118
|
export type EV<T> = Expr<T> | T;
|
|
119
|
+
export interface Expr<T> {
|
|
120
|
+
[Expr.Data]: ExprData;
|
|
121
|
+
[Expr.IsExpr]: boolean;
|
|
122
|
+
}
|
|
122
123
|
export declare class Expr<T> {
|
|
123
124
|
constructor(expr: ExprData);
|
|
124
|
-
[DATA]: ExprData;
|
|
125
|
-
[IS_EXPR]: boolean;
|
|
126
125
|
asc(): OrderBy;
|
|
127
126
|
desc(): OrderBy;
|
|
128
127
|
not(): Expr<boolean>;
|
|
@@ -164,9 +163,9 @@ export declare class Expr<T> {
|
|
|
164
163
|
get<T>(name: string): Expr<T>;
|
|
165
164
|
}
|
|
166
165
|
export declare namespace Expr {
|
|
167
|
-
const Data:
|
|
168
|
-
const IsExpr:
|
|
169
|
-
const ToExpr:
|
|
166
|
+
const Data: unique symbol;
|
|
167
|
+
const IsExpr: unique symbol;
|
|
168
|
+
const ToExpr: unique symbol;
|
|
170
169
|
const NULL: Expr<null>;
|
|
171
170
|
function value<T>(value: T): Expr<T>;
|
|
172
171
|
function create<T>(input: EV<T>): Expr<T>;
|
|
@@ -174,4 +173,3 @@ export declare namespace Expr {
|
|
|
174
173
|
function or(...conditions: Array<EV<boolean>>): Expr<boolean>;
|
|
175
174
|
function isExpr<T>(input: any): input is Expr<T>;
|
|
176
175
|
}
|
|
177
|
-
export {};
|
package/dist/define/Expr.js
CHANGED
|
@@ -4,9 +4,6 @@ import { OrderDirection } from "./OrderBy.js";
|
|
|
4
4
|
import { ParamData, ParamType } from "./Param.js";
|
|
5
5
|
import { Target } from "./Target.js";
|
|
6
6
|
var { fromEntries, entries } = Object;
|
|
7
|
-
var DATA = Symbol("Expr.Data");
|
|
8
|
-
var TO_EXPR = Symbol("Expr.ToExpr");
|
|
9
|
-
var IS_EXPR = Symbol("Expr.IsExpr");
|
|
10
7
|
var UnOpType = /* @__PURE__ */ ((UnOpType2) => {
|
|
11
8
|
UnOpType2["Not"] = "Not";
|
|
12
9
|
UnOpType2["IsNull"] = "IsNull";
|
|
@@ -138,10 +135,10 @@ var ExprData;
|
|
|
138
135
|
function create(input) {
|
|
139
136
|
if (input === null || input === void 0)
|
|
140
137
|
return new ExprData2.Param(new ParamData.Value(null));
|
|
141
|
-
if (input && (typeof input === "function" || typeof input === "object") && input[
|
|
142
|
-
input = input[
|
|
138
|
+
if (input && (typeof input === "function" || typeof input === "object") && input[Expr.ToExpr])
|
|
139
|
+
input = input[Expr.ToExpr]();
|
|
143
140
|
if (Expr.isExpr(input))
|
|
144
|
-
return input[
|
|
141
|
+
return input[Expr.Data];
|
|
145
142
|
if (input && typeof input === "object" && !Array.isArray(input))
|
|
146
143
|
return new ExprData2.Record(
|
|
147
144
|
fromEntries(
|
|
@@ -154,18 +151,17 @@ var ExprData;
|
|
|
154
151
|
})(ExprData || (ExprData = {}));
|
|
155
152
|
var Expr = class {
|
|
156
153
|
constructor(expr) {
|
|
157
|
-
this[
|
|
154
|
+
this[Expr.Data] = expr;
|
|
155
|
+
this[Expr.IsExpr] = true;
|
|
158
156
|
}
|
|
159
|
-
[DATA];
|
|
160
|
-
[IS_EXPR] = true;
|
|
161
157
|
asc() {
|
|
162
|
-
return { expr: this[
|
|
158
|
+
return { expr: this[Expr.Data], order: OrderDirection.Asc };
|
|
163
159
|
}
|
|
164
160
|
desc() {
|
|
165
|
-
return { expr: this[
|
|
161
|
+
return { expr: this[Expr.Data], order: OrderDirection.Desc };
|
|
166
162
|
}
|
|
167
163
|
not() {
|
|
168
|
-
return new Expr(new ExprData.UnOp("Not" /* Not */, this[
|
|
164
|
+
return new Expr(new ExprData.UnOp("Not" /* Not */, this[Expr.Data]));
|
|
169
165
|
}
|
|
170
166
|
or(that) {
|
|
171
167
|
const a = this;
|
|
@@ -174,7 +170,9 @@ var Expr = class {
|
|
|
174
170
|
return b;
|
|
175
171
|
if (a.isConstant(true) || b.isConstant(false))
|
|
176
172
|
return this;
|
|
177
|
-
return new Expr(
|
|
173
|
+
return new Expr(
|
|
174
|
+
new ExprData.BinOp("Or" /* Or */, a[Expr.Data], b[Expr.Data])
|
|
175
|
+
);
|
|
178
176
|
}
|
|
179
177
|
and(that) {
|
|
180
178
|
const a = this;
|
|
@@ -183,19 +181,26 @@ var Expr = class {
|
|
|
183
181
|
return this;
|
|
184
182
|
if (a.isConstant(true) || b.isConstant(false))
|
|
185
183
|
return b;
|
|
186
|
-
return new Expr(
|
|
184
|
+
return new Expr(
|
|
185
|
+
new ExprData.BinOp("And" /* And */, a[Expr.Data], b[Expr.Data])
|
|
186
|
+
);
|
|
187
187
|
}
|
|
188
188
|
is(that) {
|
|
189
189
|
if (that === null || Expr.isExpr(that) && that.isConstant(null))
|
|
190
190
|
return this.isNull();
|
|
191
191
|
return new Expr(
|
|
192
|
-
new ExprData.BinOp(
|
|
192
|
+
new ExprData.BinOp(
|
|
193
|
+
"Equals" /* Equals */,
|
|
194
|
+
this[Expr.Data],
|
|
195
|
+
ExprData.create(that)
|
|
196
|
+
)
|
|
193
197
|
);
|
|
194
198
|
}
|
|
195
199
|
isConstant(value) {
|
|
196
|
-
|
|
200
|
+
const expr = this[Expr.Data];
|
|
201
|
+
switch (expr.type) {
|
|
197
202
|
case "ExprData.Param" /* Param */:
|
|
198
|
-
const param =
|
|
203
|
+
const param = expr.param;
|
|
199
204
|
switch (param.type) {
|
|
200
205
|
case ParamType.Value:
|
|
201
206
|
return param.value === value;
|
|
@@ -210,101 +215,121 @@ var Expr = class {
|
|
|
210
215
|
if (that === null || Expr.isExpr(that) && that.isConstant(null))
|
|
211
216
|
return this.isNotNull();
|
|
212
217
|
return new Expr(
|
|
213
|
-
new ExprData.BinOp(
|
|
218
|
+
new ExprData.BinOp(
|
|
219
|
+
"NotEquals" /* NotEquals */,
|
|
220
|
+
this[Expr.Data],
|
|
221
|
+
ExprData.create(that)
|
|
222
|
+
)
|
|
214
223
|
);
|
|
215
224
|
}
|
|
216
225
|
isNull() {
|
|
217
|
-
return new Expr(new ExprData.UnOp("IsNull" /* IsNull */, this[
|
|
226
|
+
return new Expr(new ExprData.UnOp("IsNull" /* IsNull */, this[Expr.Data]));
|
|
218
227
|
}
|
|
219
228
|
isNotNull() {
|
|
220
229
|
return this.isNull().not();
|
|
221
230
|
}
|
|
222
231
|
isIn(that) {
|
|
223
232
|
return new Expr(
|
|
224
|
-
new ExprData.BinOp("In" /* In */, this[
|
|
233
|
+
new ExprData.BinOp("In" /* In */, this[Expr.Data], ExprData.create(that))
|
|
225
234
|
);
|
|
226
235
|
}
|
|
227
236
|
isNotIn(that) {
|
|
228
237
|
return new Expr(
|
|
229
|
-
new ExprData.BinOp(
|
|
238
|
+
new ExprData.BinOp(
|
|
239
|
+
"NotIn" /* NotIn */,
|
|
240
|
+
this[Expr.Data],
|
|
241
|
+
ExprData.create(that)
|
|
242
|
+
)
|
|
230
243
|
);
|
|
231
244
|
}
|
|
232
245
|
isGreater(that) {
|
|
233
246
|
return new Expr(
|
|
234
|
-
new ExprData.BinOp(
|
|
247
|
+
new ExprData.BinOp(
|
|
248
|
+
"Greater" /* Greater */,
|
|
249
|
+
this[Expr.Data],
|
|
250
|
+
ExprData.create(that)
|
|
251
|
+
)
|
|
235
252
|
);
|
|
236
253
|
}
|
|
237
254
|
isGreaterOrEqual(that) {
|
|
238
255
|
return new Expr(
|
|
239
256
|
new ExprData.BinOp(
|
|
240
257
|
"GreaterOrEqual" /* GreaterOrEqual */,
|
|
241
|
-
this[
|
|
258
|
+
this[Expr.Data],
|
|
242
259
|
ExprData.create(that)
|
|
243
260
|
)
|
|
244
261
|
);
|
|
245
262
|
}
|
|
246
263
|
isLess(that) {
|
|
247
264
|
return new Expr(
|
|
248
|
-
new ExprData.BinOp("Less" /* Less */, this[
|
|
265
|
+
new ExprData.BinOp("Less" /* Less */, this[Expr.Data], ExprData.create(that))
|
|
249
266
|
);
|
|
250
267
|
}
|
|
251
268
|
isLessOrEqual(that) {
|
|
252
269
|
return new Expr(
|
|
253
270
|
new ExprData.BinOp(
|
|
254
271
|
"LessOrEqual" /* LessOrEqual */,
|
|
255
|
-
this[
|
|
272
|
+
this[Expr.Data],
|
|
256
273
|
ExprData.create(that)
|
|
257
274
|
)
|
|
258
275
|
);
|
|
259
276
|
}
|
|
260
277
|
add(that) {
|
|
261
278
|
return new Expr(
|
|
262
|
-
new ExprData.BinOp("Add" /* Add */, this[
|
|
279
|
+
new ExprData.BinOp("Add" /* Add */, this[Expr.Data], ExprData.create(that))
|
|
263
280
|
);
|
|
264
281
|
}
|
|
265
282
|
substract(that) {
|
|
266
283
|
return new Expr(
|
|
267
|
-
new ExprData.BinOp("Subt" /* Subt */, this[
|
|
284
|
+
new ExprData.BinOp("Subt" /* Subt */, this[Expr.Data], ExprData.create(that))
|
|
268
285
|
);
|
|
269
286
|
}
|
|
270
287
|
multiply(that) {
|
|
271
288
|
return new Expr(
|
|
272
|
-
new ExprData.BinOp("Mult" /* Mult */, this[
|
|
289
|
+
new ExprData.BinOp("Mult" /* Mult */, this[Expr.Data], ExprData.create(that))
|
|
273
290
|
);
|
|
274
291
|
}
|
|
275
292
|
remainder(that) {
|
|
276
293
|
return new Expr(
|
|
277
|
-
new ExprData.BinOp("Mod" /* Mod */, this[
|
|
294
|
+
new ExprData.BinOp("Mod" /* Mod */, this[Expr.Data], ExprData.create(that))
|
|
278
295
|
);
|
|
279
296
|
}
|
|
280
297
|
divide(that) {
|
|
281
298
|
return new Expr(
|
|
282
|
-
new ExprData.BinOp("Div" /* Div */, this[
|
|
299
|
+
new ExprData.BinOp("Div" /* Div */, this[Expr.Data], ExprData.create(that))
|
|
283
300
|
);
|
|
284
301
|
}
|
|
285
302
|
concat(that) {
|
|
286
303
|
return new Expr(
|
|
287
|
-
new ExprData.BinOp(
|
|
304
|
+
new ExprData.BinOp(
|
|
305
|
+
"Concat" /* Concat */,
|
|
306
|
+
this[Expr.Data],
|
|
307
|
+
ExprData.create(that)
|
|
308
|
+
)
|
|
288
309
|
);
|
|
289
310
|
}
|
|
290
311
|
like(that) {
|
|
291
312
|
return new Expr(
|
|
292
|
-
new ExprData.BinOp("Like" /* Like */, this[
|
|
313
|
+
new ExprData.BinOp("Like" /* Like */, this[Expr.Data], ExprData.create(that))
|
|
293
314
|
);
|
|
294
315
|
}
|
|
295
316
|
glob(that) {
|
|
296
317
|
return new Expr(
|
|
297
|
-
new ExprData.BinOp("Glob" /* Glob */, this[
|
|
318
|
+
new ExprData.BinOp("Glob" /* Glob */, this[Expr.Data], ExprData.create(that))
|
|
298
319
|
);
|
|
299
320
|
}
|
|
300
321
|
match(that) {
|
|
301
322
|
return new Expr(
|
|
302
|
-
new ExprData.BinOp(
|
|
323
|
+
new ExprData.BinOp(
|
|
324
|
+
"Match" /* Match */,
|
|
325
|
+
this[Expr.Data],
|
|
326
|
+
ExprData.create(that)
|
|
327
|
+
)
|
|
303
328
|
);
|
|
304
329
|
}
|
|
305
330
|
with(that) {
|
|
306
331
|
return new Expr(
|
|
307
|
-
new ExprData.Merge(this[
|
|
332
|
+
new ExprData.Merge(this[Expr.Data], ExprData.create(that))
|
|
308
333
|
);
|
|
309
334
|
}
|
|
310
335
|
/**
|
|
@@ -338,7 +363,7 @@ var Expr = class {
|
|
|
338
363
|
}
|
|
339
364
|
filter(fn) {
|
|
340
365
|
const alias = randomAlias();
|
|
341
|
-
const target = new Target.Expr(this[
|
|
366
|
+
const target = new Target.Expr(this[Expr.Data], alias);
|
|
342
367
|
return new Expr(
|
|
343
368
|
new ExprData.Filter(
|
|
344
369
|
target,
|
|
@@ -348,7 +373,7 @@ var Expr = class {
|
|
|
348
373
|
}
|
|
349
374
|
map(fn) {
|
|
350
375
|
const alias = randomAlias();
|
|
351
|
-
const target = new Target.Expr(this[
|
|
376
|
+
const target = new Target.Expr(this[Expr.Data], alias);
|
|
352
377
|
return new Expr(
|
|
353
378
|
new ExprData.Map(
|
|
354
379
|
target,
|
|
@@ -360,13 +385,13 @@ var Expr = class {
|
|
|
360
385
|
return this;
|
|
361
386
|
}
|
|
362
387
|
get(name) {
|
|
363
|
-
return new Expr(new ExprData.Field(this[
|
|
388
|
+
return new Expr(new ExprData.Field(this[Expr.Data], name));
|
|
364
389
|
}
|
|
365
390
|
};
|
|
366
391
|
((Expr2) => {
|
|
367
|
-
Expr2.Data =
|
|
368
|
-
Expr2.IsExpr =
|
|
369
|
-
Expr2.ToExpr =
|
|
392
|
+
Expr2.Data = Symbol("Expr.Data");
|
|
393
|
+
Expr2.IsExpr = Symbol("Expr.IsExpr");
|
|
394
|
+
Expr2.ToExpr = Symbol("Expr.ToExpr");
|
|
370
395
|
Expr2.NULL = create(null);
|
|
371
396
|
function value(value2) {
|
|
372
397
|
return new Expr2(new ExprData.Param(new ParamData.Value(value2)));
|
|
@@ -387,7 +412,7 @@ var Expr = class {
|
|
|
387
412
|
}
|
|
388
413
|
Expr2.or = or;
|
|
389
414
|
function isExpr(input) {
|
|
390
|
-
return input !== null && (typeof input === "object" || typeof input === "function") && input[
|
|
415
|
+
return input !== null && (typeof input === "object" || typeof input === "function") && input[Expr2.IsExpr];
|
|
391
416
|
}
|
|
392
417
|
Expr2.isExpr = isExpr;
|
|
393
418
|
})(Expr || (Expr = {}));
|
package/dist/define/Query.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { OrderBy } from './OrderBy';
|
|
|
7
7
|
import { Selection } from './Selection';
|
|
8
8
|
import { TableData } from './Table';
|
|
9
9
|
import { Target } from './Target';
|
|
10
|
-
declare const DATA: unique symbol;
|
|
11
10
|
export declare enum QueryType {
|
|
12
11
|
Insert = "QueryData.Insert",
|
|
13
12
|
Select = "QueryData.Select",
|
|
@@ -135,19 +134,20 @@ export declare namespace QueryData {
|
|
|
135
134
|
}
|
|
136
135
|
export {};
|
|
137
136
|
}
|
|
137
|
+
export interface Query<T> {
|
|
138
|
+
[Query.Data]: QueryData;
|
|
139
|
+
}
|
|
138
140
|
export declare class Query<T> {
|
|
139
141
|
[Selection.CursorType]: () => T;
|
|
140
|
-
[DATA]: QueryData;
|
|
141
142
|
constructor(query: QueryData);
|
|
142
143
|
next<T>(cursor: Query<T>): Query<T>;
|
|
143
144
|
on(driver: Driver.Sync): T;
|
|
144
145
|
on(driver: Driver.Async): Promise<T>;
|
|
145
146
|
toSql(driver: Driver, options?: CompileOptions): string;
|
|
146
147
|
toJSON(): QueryData;
|
|
147
|
-
protected addWhere(where: Array<EV<boolean>>): this[typeof
|
|
148
|
+
protected addWhere(where: Array<EV<boolean>>): this[typeof Query.Data];
|
|
148
149
|
}
|
|
149
150
|
export declare namespace Query {
|
|
150
|
-
const Data:
|
|
151
|
+
const Data: unique symbol;
|
|
151
152
|
function isQuery<T>(input: any): input is Query<T>;
|
|
152
153
|
}
|
|
153
|
-
export {};
|
package/dist/define/Query.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// src/define/Query.ts
|
|
2
2
|
import { Expr } from "./Expr.js";
|
|
3
3
|
var { assign } = Object;
|
|
4
|
-
var DATA = Symbol("Query.Data");
|
|
5
4
|
var QueryType = /* @__PURE__ */ ((QueryType2) => {
|
|
6
5
|
QueryType2["Insert"] = "QueryData.Insert";
|
|
7
6
|
QueryType2["Select"] = "QueryData.Select";
|
|
@@ -100,30 +99,29 @@ var QueryData;
|
|
|
100
99
|
QueryData2.Raw = Raw;
|
|
101
100
|
})(QueryData || (QueryData = {}));
|
|
102
101
|
var Query = class {
|
|
103
|
-
[DATA];
|
|
104
102
|
constructor(query) {
|
|
105
|
-
this[
|
|
103
|
+
this[Query.Data] = query;
|
|
106
104
|
}
|
|
107
105
|
next(cursor) {
|
|
108
106
|
return new Query(
|
|
109
107
|
new QueryData.Batch(
|
|
110
|
-
this[
|
|
111
|
-
queries: [this[
|
|
108
|
+
this[Query.Data].with({
|
|
109
|
+
queries: [this[Query.Data], cursor[Query.Data]]
|
|
112
110
|
})
|
|
113
111
|
)
|
|
114
112
|
);
|
|
115
113
|
}
|
|
116
114
|
on(driver) {
|
|
117
|
-
return driver.executeQuery(this[
|
|
115
|
+
return driver.executeQuery(this[Query.Data]);
|
|
118
116
|
}
|
|
119
117
|
toSql(driver, options = { forceInline: true }) {
|
|
120
|
-
return driver.formatter.compile(this[
|
|
118
|
+
return driver.formatter.compile(this[Query.Data], options).sql;
|
|
121
119
|
}
|
|
122
120
|
toJSON() {
|
|
123
|
-
return this[
|
|
121
|
+
return this[Query.Data];
|
|
124
122
|
}
|
|
125
123
|
addWhere(where) {
|
|
126
|
-
const query = this[
|
|
124
|
+
const query = this[Query.Data];
|
|
127
125
|
const conditions = where.slice();
|
|
128
126
|
if (query.where)
|
|
129
127
|
conditions.push(new Expr(query.where));
|
|
@@ -131,9 +129,9 @@ var Query = class {
|
|
|
131
129
|
}
|
|
132
130
|
};
|
|
133
131
|
((Query2) => {
|
|
134
|
-
Query2.Data =
|
|
132
|
+
Query2.Data = Symbol("Query.Data");
|
|
135
133
|
function isQuery(input) {
|
|
136
|
-
return input !== null && Boolean(
|
|
134
|
+
return input !== null && Boolean(Query2.Data in input);
|
|
137
135
|
}
|
|
138
136
|
Query2.isQuery = isQuery;
|
|
139
137
|
})(Query || (Query = {}));
|
package/dist/define/Table.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ import type { Fields } from './Fields';
|
|
|
5
5
|
import { Index, IndexData } from './Index';
|
|
6
6
|
import type { Selection } from './Selection';
|
|
7
7
|
import { TableSelect } from './query/TableSelect';
|
|
8
|
-
declare const DATA: unique symbol;
|
|
9
|
-
declare const META: unique symbol;
|
|
10
8
|
interface TableDefinition {
|
|
11
9
|
}
|
|
12
10
|
export declare class TableData {
|
|
@@ -27,12 +25,12 @@ export interface TableInstance<Definition> extends ClearFunctionProto {
|
|
|
27
25
|
}
|
|
28
26
|
export declare class TableInstance<Definition> {
|
|
29
27
|
[Selection.TableType](): Table.Select<Definition>;
|
|
30
|
-
get [
|
|
28
|
+
get [Table.Data](): TableData;
|
|
31
29
|
}
|
|
32
30
|
export type Table<Definition> = Definition & TableInstance<Definition>;
|
|
33
31
|
export declare namespace Table {
|
|
34
|
-
export const Data:
|
|
35
|
-
export const Meta:
|
|
32
|
+
export const Data: unique symbol;
|
|
33
|
+
export const Meta: unique symbol;
|
|
36
34
|
export type Of<Row> = Table<{
|
|
37
35
|
[K in keyof Row as K extends string ? K : never]: Column<Row[K]> & Fields<Row[K]>;
|
|
38
36
|
}>;
|
|
@@ -60,6 +58,6 @@ export type table<T> = T extends Table<infer D> ? Table.Select<D> : never;
|
|
|
60
58
|
export declare function createTable<Definition>(data: TableData): Table<Definition>;
|
|
61
59
|
export declare function table<T extends {}>(define: Record<string, T | Define<T>>): Table<T>;
|
|
62
60
|
export declare namespace table {
|
|
63
|
-
const meta: typeof
|
|
61
|
+
const meta: typeof Table.Meta;
|
|
64
62
|
}
|
|
65
63
|
export {};
|
package/dist/define/Table.js
CHANGED
|
@@ -16,8 +16,6 @@ var {
|
|
|
16
16
|
setPrototypeOf,
|
|
17
17
|
defineProperty
|
|
18
18
|
} = Object;
|
|
19
|
-
var DATA = Symbol("Table.Data");
|
|
20
|
-
var META = Symbol("Table.Meta");
|
|
21
19
|
var TableData = class {
|
|
22
20
|
constructor(data) {
|
|
23
21
|
assign(this, data);
|
|
@@ -25,8 +23,8 @@ var TableData = class {
|
|
|
25
23
|
};
|
|
26
24
|
var Table;
|
|
27
25
|
((Table2) => {
|
|
28
|
-
Table2.Data =
|
|
29
|
-
Table2.Meta =
|
|
26
|
+
Table2.Data = Symbol("Table.Data");
|
|
27
|
+
Table2.Meta = Symbol("Table.Meta");
|
|
30
28
|
})(Table || (Table = {}));
|
|
31
29
|
function createTable(data) {
|
|
32
30
|
const target = new Target.Table(data);
|
|
@@ -63,7 +61,7 @@ function createTable(data) {
|
|
|
63
61
|
delete call.length;
|
|
64
62
|
for (const [key, value] of entries(expressions))
|
|
65
63
|
defineProperty(call, key, { value, enumerable: true, configurable: true });
|
|
66
|
-
defineProperty(call,
|
|
64
|
+
defineProperty(call, Table.Data, { value: data, enumerable: false });
|
|
67
65
|
defineProperty(call, Expr.ToExpr, { value: toExpr, enumerable: false });
|
|
68
66
|
setPrototypeOf(call, getPrototypeOf(data.definition));
|
|
69
67
|
return call;
|
|
@@ -117,7 +115,7 @@ function table(define) {
|
|
|
117
115
|
return res;
|
|
118
116
|
}
|
|
119
117
|
((table2) => {
|
|
120
|
-
table2.meta =
|
|
118
|
+
table2.meta = Table.Meta;
|
|
121
119
|
})(table || (table = {}));
|
|
122
120
|
export {
|
|
123
121
|
Table,
|
|
@@ -6,7 +6,6 @@ import { Selection } from './Selection';
|
|
|
6
6
|
import { Table } from './Table';
|
|
7
7
|
import { Target } from './Target';
|
|
8
8
|
import { SelectMultiple } from './query/Select';
|
|
9
|
-
declare const DATA: unique symbol;
|
|
10
9
|
export interface VirtualTableInstance<Definition> extends ClearFunctionProto {
|
|
11
10
|
(conditions: {
|
|
12
11
|
[K in keyof Definition]?: Definition[K] extends Expr<infer V> ? EV<V> : never;
|
|
@@ -15,7 +14,7 @@ export interface VirtualTableInstance<Definition> extends ClearFunctionProto {
|
|
|
15
14
|
}
|
|
16
15
|
export declare class VirtualTableInstance<Definition> {
|
|
17
16
|
[Selection.TableType](): Table.Select<Definition>;
|
|
18
|
-
get [
|
|
17
|
+
get [VirtualTable.Data](): VirtualTableData;
|
|
19
18
|
}
|
|
20
19
|
export interface VirtualTableData {
|
|
21
20
|
name: string;
|
|
@@ -24,10 +23,9 @@ export interface VirtualTableData {
|
|
|
24
23
|
}
|
|
25
24
|
export type VirtualTable<Definition> = Definition & VirtualTableInstance<Definition>;
|
|
26
25
|
export declare namespace VirtualTable {
|
|
27
|
-
const Data:
|
|
26
|
+
const Data: unique symbol;
|
|
28
27
|
type Of<Row> = VirtualTable<{
|
|
29
28
|
[K in keyof Row as K extends string ? K : never]: Column<Row[K]> & Fields<Row[K]>;
|
|
30
29
|
}>;
|
|
31
30
|
}
|
|
32
31
|
export declare function createVirtualTable<Definition>(data: VirtualTableData): VirtualTable<Definition>;
|
|
33
|
-
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// src/define/VirtualTable.ts
|
|
2
2
|
import { BinOpType, Expr, ExprData } from "./Expr.js";
|
|
3
3
|
var { create, entries } = Object;
|
|
4
|
-
var DATA = Symbol("VirtualTable.Data");
|
|
5
4
|
var VirtualTable;
|
|
6
5
|
((VirtualTable2) => {
|
|
7
|
-
VirtualTable2.Data =
|
|
6
|
+
VirtualTable2.Data = Symbol("VirtualTable.Data");
|
|
8
7
|
})(VirtualTable || (VirtualTable = {}));
|
|
9
8
|
function createVirtualTable(data) {
|
|
10
9
|
const cache = create(null);
|
|
@@ -23,7 +22,7 @@ function createVirtualTable(data) {
|
|
|
23
22
|
}
|
|
24
23
|
return new Proxy(call, {
|
|
25
24
|
get(_, column) {
|
|
26
|
-
if (column ===
|
|
25
|
+
if (column === VirtualTable.Data)
|
|
27
26
|
return data;
|
|
28
27
|
if (column === Expr.ToExpr)
|
|
29
28
|
return new Expr(new ExprData.Row(data.target));
|
|
@@ -88,7 +88,7 @@ export type SqliteFunctions = {
|
|
|
88
88
|
/** The avg() function returns the average value of all non-NULL X within a group. string and BLOB values that do not look like numbers are numbererpreted as 0. The result of avg() is always a numbering ponumber value as long as at there is at least one non-NULL input even if all inputs are numberegers. The result of avg() is NULL if and only if there are no non-NULL inputs. */
|
|
89
89
|
avg(x: Expr<number>): Expr<number>;
|
|
90
90
|
/** The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. A comma (",") is used as the separator if Y is omitted. The order of the concatenated elements is arbitrary. */
|
|
91
|
-
group_concat(x: EV<string>, y
|
|
91
|
+
group_concat(x: EV<string>, y?: EV<string>): Expr<string>;
|
|
92
92
|
/** The sum() and total() aggregate functions return sum of all non-NULL values in the group. If there are no non-NULL input rows then sum() returns NULL but total() returns 0.0. NULL is not normally a helpful result for the sum of no rows but the SQL standard requires it and most other SQL database engines implement sum() that way so SQLite does it in the same way in order to be compatible. The non-standard total() function is provided as a convenient way to work around this design problem in the SQL language.
|
|
93
93
|
|
|
94
94
|
The result of total() is always a numbering ponumber value. The result of sum() is an numbereger value if all non-NULL inputs are numberegers. If any input to sum() is neither an numbereger or a NULL then sum() returns a numbering ponumber value which might be an approximation to the true sum.
|
|
@@ -162,4 +162,4 @@ export declare const count: (x?: Expr<any>) => Expr<number>, iif: <T>(x: EV<bool
|
|
|
162
162
|
(x: EV<any>, type: 'real'): Expr<number>;
|
|
163
163
|
(x: EV<any>, type: 'integer'): Expr<number>;
|
|
164
164
|
(x: EV<any>, type: 'numeric'): Expr<number>;
|
|
165
|
-
}, abs: (x: EV<number>) => Expr<number>, changes: () => Expr<number>, char: (...arg: Array<EV<number>>) => Expr<string>, coalesce: (x: EV<any>, y: EV<any>, ...rest: EV<any>) => Expr<any>, ifnull: <T>(x: EV<T>, y: EV<T>) => Expr<T>, instr: (x: EV<string>, y: EV<string>) => Expr<number>, last_insert_rowid: () => Expr<number>, length: (x: EV<string>) => Expr<number>, likelihood: (x: EV<boolean>, y: number) => Expr<boolean>, likely: (x: EV<boolean>) => Expr<boolean>, lower: (x: EV<string>) => Expr<string>, ltrim: (x: EV<string>, y?: EV<string>) => Expr<string>, max: <T>(x: EV<T>, ...rest: EV<T>[]) => Expr<T>, min: <T>(x: EV<T>, ...rest: EV<T>[]) => Expr<T>, nullif: <T>(x: EV<T>, y: EV<T>) => Expr<T | null>, prnumberf: (format: string, ...rest: Array<Expr<any>>) => Expr<string>, quote: (x: EV<string>) => Expr<string>, random: () => Expr<number>, replace: (x: EV<string>, y: EV<string>, z: EV<string>) => Expr<string>, round: (x: EV<number>, y?: EV<number>) => Expr<number>, rtrim: (x: EV<string>, y?: EV<string>) => Expr<string>, sign: (x: EV<number>) => Expr<number>, soundex: (x: EV<string>) => Expr<string>, sqlite_version: () => Expr<string>, substr: (x: EV<string>, y: EV<number>, z?: EV<number>) => Expr<string>, total_changes: () => Expr<number>, trim: (x: EV<string>, Y: EV<string>) => Expr<string>, unicode: (x: EV<string>) => Expr<number>, unlikely: (x: EV<boolean>) => Expr<boolean>, upper: (x: EV<string>) => Expr<string>, avg: (x: Expr<number>) => Expr<number>, group_concat: (x: EV<string>, y
|
|
165
|
+
}, abs: (x: EV<number>) => Expr<number>, changes: () => Expr<number>, char: (...arg: Array<EV<number>>) => Expr<string>, coalesce: (x: EV<any>, y: EV<any>, ...rest: EV<any>) => Expr<any>, ifnull: <T>(x: EV<T>, y: EV<T>) => Expr<T>, instr: (x: EV<string>, y: EV<string>) => Expr<number>, last_insert_rowid: () => Expr<number>, length: (x: EV<string>) => Expr<number>, likelihood: (x: EV<boolean>, y: number) => Expr<boolean>, likely: (x: EV<boolean>) => Expr<boolean>, lower: (x: EV<string>) => Expr<string>, ltrim: (x: EV<string>, y?: EV<string>) => Expr<string>, max: <T>(x: EV<T>, ...rest: EV<T>[]) => Expr<T>, min: <T>(x: EV<T>, ...rest: EV<T>[]) => Expr<T>, nullif: <T>(x: EV<T>, y: EV<T>) => Expr<T | null>, prnumberf: (format: string, ...rest: Array<Expr<any>>) => Expr<string>, quote: (x: EV<string>) => Expr<string>, random: () => Expr<number>, replace: (x: EV<string>, y: EV<string>, z: EV<string>) => Expr<string>, round: (x: EV<number>, y?: EV<number>) => Expr<number>, rtrim: (x: EV<string>, y?: EV<string>) => Expr<string>, sign: (x: EV<number>) => Expr<number>, soundex: (x: EV<string>) => Expr<string>, sqlite_version: () => Expr<string>, substr: (x: EV<string>, y: EV<number>, z?: EV<number>) => Expr<string>, total_changes: () => Expr<number>, trim: (x: EV<string>, Y: EV<string>) => Expr<string>, unicode: (x: EV<string>) => Expr<number>, unlikely: (x: EV<boolean>) => Expr<boolean>, upper: (x: EV<string>) => Expr<string>, avg: (x: Expr<number>) => Expr<number>, group_concat: (x: EV<string>, y?: EV<string>) => Expr<string>, sum: (x: EV<number>) => Expr<number>, acos: (x: EV<number>) => Expr<number>, acosh: (x: EV<number>) => Expr<number>, asin: (x: EV<number>) => Expr<number>, asinh: (x: EV<number>) => Expr<number>, atan: (x: EV<number>) => Expr<number>, atan2: (x: EV<number>, y: EV<number>) => Expr<number>, atanh: (x: EV<number>) => Expr<number>, ceil: (x: EV<number>) => Expr<number>, cos: (x: EV<number>) => Expr<number>, cosh: (x: EV<number>) => Expr<number>, degrees: (x: EV<number>) => Expr<number>, exp: (x: EV<number>) => Expr<number>, floor: (x: EV<number>) => Expr<number>, ln: (x: EV<number>) => Expr<number>, log: (x: EV<number>, y?: EV<number>) => Expr<number>, log2: (x: EV<number>) => Expr<number>, mod: (x: EV<number>, y: EV<number>) => Expr<number>, pi: (x: EV<number>) => Expr<number>, pow: (x: EV<number>, y: EV<number>) => Expr<number>, radians: (x: EV<number>) => Expr<number>, sin: (x: EV<number>) => Expr<number>, sinh: (x: EV<number>) => Expr<number>, sqrt: (x: EV<number>) => Expr<number>, tan: (x: EV<number>) => Expr<number>, tanh: (x: EV<number>) => Expr<number>, trunc: (x: EV<number>) => Expr<number>, date: (timeValue: EV<any>, ...rest: Array<EV<string>>) => Expr<string>, time: (timeValue: EV<any>, ...rest: Array<EV<string>>) => Expr<string>, datetime: (timeValue: EV<any>, ...rest: Array<EV<string>>) => Expr<string>, julianday: (timeValue: EV<any>, ...rest: Array<EV<string>>) => Expr<string>, strftime: (format: EV<string>, timeValue: EV<any>, ...rest: Array<EV<string>>) => Expr<string>;
|