alasql 4.18.0 → 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.
@@ -1,7 +1,7 @@
1
- //! AlaSQL v4.17.3 build: develop-a80b2965 | © 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.3
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