alasql 4.19.1 → 4.20.1
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/context/sqllogictest-failure-kinds.js +36 -0
- package/context/tag-prototype.js +127 -0
- package/dist/alasql-worker.js +2 -2
- package/dist/alasql.d.ts +15 -2
- package/dist/alasql.fs.js +375 -302
- package/dist/alasql.js +375 -302
- package/dist/alasql.min.js +30 -30
- package/package.json +5 -5
- package/types/alasql.d.ts +15 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alasql",
|
|
3
3
|
"description": "Use SQL to select and filter javascript data - including relational joins and search in nested objects (JSON). Export to and import from Excel and CSV",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.20.1",
|
|
5
5
|
"author": "Andrey Gershun <agershun@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Mathias Wulff <m@rawu.dk>"
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"git-branch-is": "5.0.0",
|
|
69
69
|
"husky": "9.1.7",
|
|
70
70
|
"jison": "^0.4.18",
|
|
71
|
-
"open": "11.0.
|
|
72
|
-
"prettier": "3.
|
|
71
|
+
"open": "11.0.4",
|
|
72
|
+
"prettier": "3.9.10",
|
|
73
73
|
"react-native-fetch-blob": "^0.10.8",
|
|
74
74
|
"rexreplace": "7.1.14",
|
|
75
75
|
"strftime": "0.10.3",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"uglify-js": "3.19.3"
|
|
78
78
|
},
|
|
79
79
|
"resolutions": {
|
|
80
|
-
"got": "
|
|
80
|
+
"got": "16",
|
|
81
81
|
"axios": "^1.16.1",
|
|
82
82
|
"json5": "2",
|
|
83
83
|
"underscore": "1",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"decode-uri-component": "0.5",
|
|
86
86
|
"semver": "7",
|
|
87
87
|
"follow-redirects": "^1.16.0",
|
|
88
|
-
"js-yaml": "
|
|
88
|
+
"js-yaml": "5",
|
|
89
89
|
"glob": "^13.0.0",
|
|
90
90
|
"rimraf": "^6.1.2"
|
|
91
91
|
},
|
package/types/alasql.d.ts
CHANGED
|
@@ -39,6 +39,11 @@ declare module 'alasql' {
|
|
|
39
39
|
<T = unknown>(params?: any, cb?: AlaSQLCallback<T>, scope?: unknown): T;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
// returned by alasql.compile(): a compiled statement with a promise helper
|
|
43
|
+
export interface AlaSQLCompiledStatement extends AlaSQLStatement {
|
|
44
|
+
promise<T = unknown>(params?: any): Promise<T>;
|
|
45
|
+
}
|
|
46
|
+
|
|
42
47
|
export type AlaSQLDefaultColumns = {[columnName: string]: string};
|
|
43
48
|
|
|
44
49
|
/**
|
|
@@ -52,7 +57,8 @@ declare module 'alasql' {
|
|
|
52
57
|
export interface Op extends AlaSQLExpression {
|
|
53
58
|
left: ExpressionNode;
|
|
54
59
|
op: string;
|
|
55
|
-
|
|
60
|
+
// `->` with a bare property name (`a->b`, `tx.a.b`) puts the name as a string
|
|
61
|
+
right?: ExpressionNode | string;
|
|
56
62
|
right1?: ExpressionNode;
|
|
57
63
|
right2?: ExpressionNode;
|
|
58
64
|
}
|
|
@@ -84,6 +90,11 @@ declare module 'alasql' {
|
|
|
84
90
|
right: ExpressionNode;
|
|
85
91
|
}
|
|
86
92
|
|
|
93
|
+
export interface FuncValue extends AlaSQLExpression {
|
|
94
|
+
funcid: string;
|
|
95
|
+
args?: ExpressionNode[];
|
|
96
|
+
}
|
|
97
|
+
|
|
87
98
|
export type ExpressionNode =
|
|
88
99
|
| Op
|
|
89
100
|
| Column
|
|
@@ -91,7 +102,8 @@ declare module 'alasql' {
|
|
|
91
102
|
| NumValue
|
|
92
103
|
| StringValue
|
|
93
104
|
| LogicValue
|
|
94
|
-
| UniOp
|
|
105
|
+
| UniOp
|
|
106
|
+
| FuncValue;
|
|
95
107
|
|
|
96
108
|
export interface ExpressionWrapper extends AlaSQLExpression {
|
|
97
109
|
expression: ExpressionNode;
|
|
@@ -221,6 +233,7 @@ declare module 'alasql' {
|
|
|
221
233
|
error: Error;
|
|
222
234
|
<T = unknown>(sql: string, params?: any, cb?: AlaSQLCallback<T>, scope?: unknown): T;
|
|
223
235
|
parse(sql: string): AlaSQLAST;
|
|
236
|
+
compile(sql: string, databaseid?: string): AlaSQLCompiledStatement;
|
|
224
237
|
promise<T = unknown>(sql: string, params?: any): Promise<T>;
|
|
225
238
|
fn: userDefinedFunctionLookUp;
|
|
226
239
|
from: userFromFunctionLookUp;
|