alasql 4.19.0 → 4.19.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/dist/alasql-worker.js +2 -2
- package/dist/alasql.d.ts +35 -28
- package/dist/alasql.fs.js +5 -4
- package/dist/alasql.js +5 -4
- package/dist/alasql.min.js +4 -4
- package/package.json +3 -3
- package/types/alasql.d.ts +35 -28
package/dist/alasql-worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.
|
|
1
|
+
//! AlaSQL v4.19.0 build: develop-98e852ad | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.
|
|
4
|
+
@version 4.19.0
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
package/dist/alasql.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ declare module 'alasql' {
|
|
|
4
4
|
import * as xlsx from 'xlsx';
|
|
5
5
|
|
|
6
6
|
// Callback with error-first convention and optional data
|
|
7
|
-
interface AlaSQLCallback<T = unknown> {
|
|
7
|
+
export interface AlaSQLCallback<T = unknown> {
|
|
8
8
|
(err: Error | null, data?: T): void;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
interface AlaSQLOptions {
|
|
11
|
+
export interface AlaSQLOptions {
|
|
12
12
|
errorlog: boolean;
|
|
13
13
|
valueof: boolean;
|
|
14
14
|
dropifnotexists: boolean; // drop database in any case
|
|
@@ -35,21 +35,21 @@ declare module 'alasql' {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// compiled Statement
|
|
38
|
-
interface AlaSQLStatement {
|
|
38
|
+
export interface AlaSQLStatement {
|
|
39
39
|
<T = unknown>(params?: any, cb?: AlaSQLCallback<T>, scope?: unknown): T;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
type AlaSQLDefaultColumns = {[columnName: string]: string};
|
|
42
|
+
export type AlaSQLDefaultColumns = {[columnName: string]: string};
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* Base parsed expression node.
|
|
46
46
|
* Node shapes below are part of the public parser AST surface and follow semver.
|
|
47
47
|
*/
|
|
48
|
-
interface AlaSQLExpression {
|
|
48
|
+
export interface AlaSQLExpression {
|
|
49
49
|
toJS(context: string, tableid: string | number, defcols: AlaSQLDefaultColumns | null): string;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
interface Op extends AlaSQLExpression {
|
|
52
|
+
export interface Op extends AlaSQLExpression {
|
|
53
53
|
left: ExpressionNode;
|
|
54
54
|
op: string;
|
|
55
55
|
right?: ExpressionNode;
|
|
@@ -57,71 +57,78 @@ declare module 'alasql' {
|
|
|
57
57
|
right2?: ExpressionNode;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
interface Column extends AlaSQLExpression {
|
|
60
|
+
export interface Column extends AlaSQLExpression {
|
|
61
61
|
columnid: string;
|
|
62
62
|
tableid?: string;
|
|
63
63
|
databaseid?: string;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
interface ParamValue extends AlaSQLExpression {
|
|
66
|
+
export interface ParamValue extends AlaSQLExpression {
|
|
67
67
|
param: string | number;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
interface NumValue extends AlaSQLExpression {
|
|
70
|
+
export interface NumValue extends AlaSQLExpression {
|
|
71
71
|
value: number;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
interface StringValue extends AlaSQLExpression {
|
|
74
|
+
export interface StringValue extends AlaSQLExpression {
|
|
75
75
|
value: string;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
interface LogicValue extends AlaSQLExpression {
|
|
78
|
+
export interface LogicValue extends AlaSQLExpression {
|
|
79
79
|
value: boolean;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
interface UniOp extends AlaSQLExpression {
|
|
82
|
+
export interface UniOp extends AlaSQLExpression {
|
|
83
83
|
op: string | null;
|
|
84
84
|
right: ExpressionNode;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
type ExpressionNode =
|
|
87
|
+
export type ExpressionNode =
|
|
88
|
+
| Op
|
|
89
|
+
| Column
|
|
90
|
+
| ParamValue
|
|
91
|
+
| NumValue
|
|
92
|
+
| StringValue
|
|
93
|
+
| LogicValue
|
|
94
|
+
| UniOp;
|
|
88
95
|
|
|
89
|
-
interface ExpressionWrapper extends AlaSQLExpression {
|
|
96
|
+
export interface ExpressionWrapper extends AlaSQLExpression {
|
|
90
97
|
expression: ExpressionNode;
|
|
91
98
|
reduced?: boolean;
|
|
92
99
|
}
|
|
93
100
|
|
|
94
|
-
interface Statement {
|
|
101
|
+
export interface Statement {
|
|
95
102
|
compile(databaseid: string): AlaSQLStatement;
|
|
96
103
|
where?: ExpressionWrapper;
|
|
97
104
|
[key: string]: unknown;
|
|
98
105
|
}
|
|
99
106
|
|
|
100
107
|
// abstract Syntax Tree
|
|
101
|
-
interface AlaSQLAST {
|
|
108
|
+
export interface AlaSQLAST {
|
|
102
109
|
statements: Statement[];
|
|
103
110
|
compile(databaseid: string): AlaSQLStatement;
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
// see https://github.com/alasql/alasql/wiki/User%20Defined%20Functions
|
|
107
|
-
interface userDefinedFunction {
|
|
114
|
+
export interface userDefinedFunction {
|
|
108
115
|
(...x: unknown[]): unknown;
|
|
109
116
|
}
|
|
110
117
|
|
|
111
|
-
interface userDefinedFunctionLookUp {
|
|
118
|
+
export interface userDefinedFunctionLookUp {
|
|
112
119
|
[x: string]: userDefinedFunction;
|
|
113
120
|
}
|
|
114
121
|
|
|
115
122
|
// see https://github.com/alasql/alasql/wiki/User%20Defined%20Functions
|
|
116
|
-
interface userAggregator {
|
|
123
|
+
export interface userAggregator {
|
|
117
124
|
(value: unknown, accumulator: unknown, stage: number): unknown;
|
|
118
125
|
}
|
|
119
126
|
|
|
120
|
-
interface userAggregatorLookUp {
|
|
127
|
+
export interface userAggregatorLookUp {
|
|
121
128
|
[x: string]: userAggregator;
|
|
122
129
|
}
|
|
123
130
|
|
|
124
|
-
interface userFromFunction {
|
|
131
|
+
export interface userFromFunction {
|
|
125
132
|
(
|
|
126
133
|
dataReference: unknown,
|
|
127
134
|
options: unknown,
|
|
@@ -131,7 +138,7 @@ declare module 'alasql' {
|
|
|
131
138
|
): void;
|
|
132
139
|
}
|
|
133
140
|
|
|
134
|
-
interface userFromFunctionLookUp {
|
|
141
|
+
export interface userFromFunctionLookUp {
|
|
135
142
|
[x: string]: userFromFunction;
|
|
136
143
|
}
|
|
137
144
|
|
|
@@ -140,7 +147,7 @@ declare module 'alasql' {
|
|
|
140
147
|
*
|
|
141
148
|
* @interface database
|
|
142
149
|
*/
|
|
143
|
-
interface database {
|
|
150
|
+
export interface database {
|
|
144
151
|
/**
|
|
145
152
|
* The database ID.
|
|
146
153
|
*
|
|
@@ -163,7 +170,7 @@ declare module 'alasql' {
|
|
|
163
170
|
*
|
|
164
171
|
* @interface table
|
|
165
172
|
*/
|
|
166
|
-
interface table {
|
|
173
|
+
export interface table {
|
|
167
174
|
/**
|
|
168
175
|
* The array of data stored in the table which can be queried
|
|
169
176
|
*
|
|
@@ -178,7 +185,7 @@ declare module 'alasql' {
|
|
|
178
185
|
*
|
|
179
186
|
* @interface databaseLookUp
|
|
180
187
|
*/
|
|
181
|
-
interface databaseLookUp {
|
|
188
|
+
export interface databaseLookUp {
|
|
182
189
|
[databaseName: string]: database;
|
|
183
190
|
}
|
|
184
191
|
|
|
@@ -187,11 +194,11 @@ declare module 'alasql' {
|
|
|
187
194
|
*
|
|
188
195
|
* @interface tableLookUp
|
|
189
196
|
*/
|
|
190
|
-
interface tableLookUp {
|
|
197
|
+
export interface tableLookUp {
|
|
191
198
|
[tableName: string]: table;
|
|
192
199
|
}
|
|
193
200
|
|
|
194
|
-
interface Database {
|
|
201
|
+
export interface Database {
|
|
195
202
|
new (databaseid?: string): Database;
|
|
196
203
|
databaseid: string;
|
|
197
204
|
dbversion: number;
|
|
@@ -209,7 +216,7 @@ declare module 'alasql' {
|
|
|
209
216
|
autoval(tablename: string, colname: string, getNext: boolean): unknown;
|
|
210
217
|
}
|
|
211
218
|
|
|
212
|
-
interface AlaSQL {
|
|
219
|
+
export interface AlaSQL {
|
|
213
220
|
options: AlaSQLOptions;
|
|
214
221
|
error: Error;
|
|
215
222
|
<T = unknown>(sql: string, params?: any, cb?: AlaSQLCallback<T>, scope?: unknown): T;
|
package/dist/alasql.fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.
|
|
1
|
+
//! AlaSQL v4.19.0 build: develop-98e852ad | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.
|
|
4
|
+
@version 4.19.0
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
|
@@ -141,8 +141,8 @@ SOFTWARE.
|
|
|
141
141
|
Current version of alasql
|
|
142
142
|
@constant {string}
|
|
143
143
|
*/
|
|
144
|
-
alasql.version = '4.
|
|
145
|
-
alasql.build = 'develop-
|
|
144
|
+
alasql.version = '4.19.0';
|
|
145
|
+
alasql.build = 'develop-98e852ad';
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
Debug flag
|
|
@@ -16525,6 +16525,7 @@ yy.Update.prototype.compile = function (databaseid) {
|
|
|
16525
16525
|
|
|
16526
16526
|
var statement = function (params, cb) {
|
|
16527
16527
|
var db = alasql.databases[databaseid];
|
|
16528
|
+
self.params = params;
|
|
16528
16529
|
|
|
16529
16530
|
if (db.engineid && alasql.engines[db.engineid].updateTable) {
|
|
16530
16531
|
|
package/dist/alasql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.
|
|
1
|
+
//! AlaSQL v4.19.0 build: develop-98e852ad | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.
|
|
4
|
+
@version 4.19.0
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
|
@@ -141,8 +141,8 @@ SOFTWARE.
|
|
|
141
141
|
Current version of alasql
|
|
142
142
|
@constant {string}
|
|
143
143
|
*/
|
|
144
|
-
alasql.version = '4.
|
|
145
|
-
alasql.build = 'develop-
|
|
144
|
+
alasql.version = '4.19.0';
|
|
145
|
+
alasql.build = 'develop-98e852ad';
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
Debug flag
|
|
@@ -16525,6 +16525,7 @@ yy.Update.prototype.compile = function (databaseid) {
|
|
|
16525
16525
|
|
|
16526
16526
|
var statement = function (params, cb) {
|
|
16527
16527
|
var db = alasql.databases[databaseid];
|
|
16528
|
+
self.params = params;
|
|
16528
16529
|
|
|
16529
16530
|
if (db.engineid && alasql.engines[db.engineid].updateTable) {
|
|
16530
16531
|
|