alasql 4.20.0 → 4.20.2

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/bin/alasql-cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  //
4
4
  // Command line interface for Alasql
5
- // Version: 0.2.3
5
+ // Version: 4.20.2
6
6
  // Date: 28.07.2015
7
7
  // (c) 2014-2022, Andrey Gershun & Mathias Wulff
8
8
  //
@@ -1,7 +1,7 @@
1
- //! AlaSQL v4.19.1 build: develop-cfae681d | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
1
+ //! AlaSQL v4.20.2 build: develop-a98910ff | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 4.19.1
4
+ @version 4.20.2
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2025 Andrey Gershun & Mathias Wulff
package/dist/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
- right?: ExpressionNode;
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,8 +90,20 @@ 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
- Op | Column | ParamValue | NumValue | StringValue | LogicValue | UniOp;
99
+ | Op
100
+ | Column
101
+ | ParamValue
102
+ | NumValue
103
+ | StringValue
104
+ | LogicValue
105
+ | UniOp
106
+ | FuncValue;
89
107
 
90
108
  export interface ExpressionWrapper extends AlaSQLExpression {
91
109
  expression: ExpressionNode;
@@ -215,6 +233,7 @@ declare module 'alasql' {
215
233
  error: Error;
216
234
  <T = unknown>(sql: string, params?: any, cb?: AlaSQLCallback<T>, scope?: unknown): T;
217
235
  parse(sql: string): AlaSQLAST;
236
+ compile(sql: string, databaseid?: string): AlaSQLCompiledStatement;
218
237
  promise<T = unknown>(sql: string, params?: any): Promise<T>;
219
238
  fn: userDefinedFunctionLookUp;
220
239
  from: userFromFunctionLookUp;