sqlparser-devexpress 2.0.7 → 2.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sqlparser-devexpress",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "main": "src/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -10,6 +10,7 @@
10
10
  "import": "./src/index.js",
11
11
  "require": "./src/index.js"
12
12
  },
13
+ "types": "src/@types/default.d.ts",
13
14
  "keywords": [
14
15
  "sql",
15
16
  "parser",
@@ -0,0 +1,35 @@
1
+ export type StateDataObject = Record<string, any>;
2
+
3
+ export interface SanitizedQuery {
4
+ sanitizedSQL: string;
5
+ extractedVariables: string[];
6
+ }
7
+
8
+ export interface ParsedResult {
9
+ ast: any; // Define a more specific type if possible
10
+ variables: string[];
11
+ }
12
+
13
+ export interface ConvertToDevExpressFormatParams {
14
+ ast: any; // Define a more specific type if possible
15
+ variables: string[];
16
+ resultObject: StateDataObject;
17
+ }
18
+
19
+ export function sanitizeQuery(filterString: string): SanitizedQuery;
20
+
21
+ export function parse(query: string, variables: string[]): ParsedResult;
22
+
23
+ export function convertToDevExpressFormat(params: ConvertToDevExpressFormatParams): any;
24
+
25
+ export function convertSQLToAst(
26
+ filterString: string,
27
+ SampleData?: StateDataObject | null,
28
+ enableConsoleLogs?: boolean
29
+ ): ParsedResult;
30
+
31
+ export function convertAstToDevextreme(
32
+ ast: any, // Define a more specific type if possible
33
+ variables: string[],
34
+ state: StateDataObject
35
+ ): any;