alasql 4.17.3 → 4.19.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/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  # AlaSQL
17
17
 
18
- <h2 align="center"><a href="http://alasql.org"><img src="https://cloud.githubusercontent.com/assets/1063454/19309516/94f8007e-9085-11e6-810f-62fd60b42185.png" alt="AlaSQL logo" styl="max-width:80%"/></a>
18
+ <h2 align="center"><a href="http://alasql.org"><img src="https://cloud.githubusercontent.com/assets/1063454/19309516/94f8007e-9085-11e6-810f-62fd60b42185.png" alt="AlaSQL logo" style="max-width:80%"/></a>
19
19
  </h2>
20
20
 
21
21
  AlaSQL - _( [à la](http://en.wiktionary.org/wiki/%C3%A0_la) [SQL](http://en.wikipedia.org/wiki/SQL) ) [ælæ ɛskju:ɛl]_ - is an open source SQL database for JavaScript with a strong focus on query speed and data source flexibility for both relational data and schemaless data. It works in the web browser, Node.js, and mobile apps.
@@ -481,7 +481,7 @@ var b = browserify("./main.js").bundle();
481
481
 
482
482
  #### Vue
483
483
 
484
- For some frameworks (lige Vue) alasql cant access XLSX by it self. We recommend handling it by including AlaSQL the following way:
484
+ For some frameworks (like Vue) alasql can't access XLSX by it self. We recommend handling it by including AlaSQL the following way:
485
485
 
486
486
  ```import alasql from 'alasql';
487
487
  import XLSX from 'xlsx';
@@ -1,7 +1,7 @@
1
- //! AlaSQL v4.17.2 build: develop-f960d23a | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
1
+ //! AlaSQL v4.18.0 build: develop-ddadb7a5 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 4.17.2
4
+ @version 4.18.0
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2025 Andrey Gershun & Mathias Wulff
package/dist/alasql.d.ts CHANGED
@@ -39,8 +39,67 @@ declare module 'alasql' {
39
39
  <T = unknown>(params?: any, cb?: AlaSQLCallback<T>, scope?: unknown): T;
40
40
  }
41
41
 
42
+ type AlaSQLDefaultColumns = {[columnName: string]: string};
43
+
44
+ /**
45
+ * Base parsed expression node.
46
+ * Node shapes below are part of the public parser AST surface and follow semver.
47
+ */
48
+ interface AlaSQLExpression {
49
+ toJS(context: string, tableid: string | number, defcols: AlaSQLDefaultColumns | null): string;
50
+ }
51
+
52
+ interface Op extends AlaSQLExpression {
53
+ left: ExpressionNode;
54
+ op: string;
55
+ right?: ExpressionNode;
56
+ right1?: ExpressionNode;
57
+ right2?: ExpressionNode;
58
+ }
59
+
60
+ interface Column extends AlaSQLExpression {
61
+ columnid: string;
62
+ tableid?: string;
63
+ databaseid?: string;
64
+ }
65
+
66
+ interface ParamValue extends AlaSQLExpression {
67
+ param: string | number;
68
+ }
69
+
70
+ interface NumValue extends AlaSQLExpression {
71
+ value: number;
72
+ }
73
+
74
+ interface StringValue extends AlaSQLExpression {
75
+ value: string;
76
+ }
77
+
78
+ interface LogicValue extends AlaSQLExpression {
79
+ value: boolean;
80
+ }
81
+
82
+ interface UniOp extends AlaSQLExpression {
83
+ op: string | null;
84
+ right: ExpressionNode;
85
+ }
86
+
87
+ type ExpressionNode = Op | Column | ParamValue | NumValue | StringValue | LogicValue | UniOp;
88
+
89
+ interface ExpressionWrapper extends AlaSQLExpression {
90
+ expression: ExpressionNode;
91
+ reduced?: boolean;
92
+ }
93
+
94
+ interface Statement {
95
+ compile(databaseid: string): AlaSQLStatement;
96
+ where?: ExpressionWrapper;
97
+ [key: string]: unknown;
98
+ }
99
+
42
100
  // abstract Syntax Tree
43
101
  interface AlaSQLAST {
102
+ statements: Statement[];
44
103
  compile(databaseid: string): AlaSQLStatement;
45
104
  }
46
105