Skip to content

Commit 9329094

Browse files
authored
Merge pull request #10 from RohitM-IN/development
Bug fixes
2 parents 0ff6c47 + 60adcc7 commit 9329094

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sqlparser-devexpress",
3-
"version": "2.2.1",
3+
"version": "2.3.0",
44
"main": "src/index.js",
55
"type": "module",
66
"scripts": {
@@ -32,4 +32,4 @@
3232
"devDependencies": {
3333
"vitest": "^3.0.5"
3434
}
35-
}
35+
}

src/@types/default.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export interface ParsedResult {
1212

1313
export interface ConvertToDevExpressFormatParams {
1414
ast: any; // Define a more specific type if possible
15-
variables: string[];
1615
resultObject: StateDataObject;
16+
enableShortCircuit?: boolean;
1717
}
1818

1919
export function sanitizeQuery(filterString: string): SanitizedQuery;
@@ -30,6 +30,6 @@ export function convertSQLToAst(
3030

3131
export function convertAstToDevextreme(
3232
ast: any, // Define a more specific type if possible
33-
variables: string[],
34-
state: StateDataObject
33+
state: StateDataObject,
34+
enableShortCircuit?: boolean,
3535
): any;

src/core/converter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { LOGICAL_OPERATORS } from "../constants.js";
77
function DevExpressConverter() {
88
// Global variables accessible throughout the converter
99
let resultObject = null;
10-
const EnableShortCircuit = true;
10+
let EnableShortCircuit = true;
1111

1212
/**
1313
* Main conversion function that sets up the global context
@@ -376,5 +376,5 @@ const devExpressConverter = DevExpressConverter();
376376
* @returns {Array|null} DevExpress format filter
377377
*/
378378
export function convertToDevExpressFormat({ ast, resultObject = null, enableShortCircuit = true }) {
379-
return devExpressConverter.init(ast, resultObject,enableShortCircuit);
379+
return devExpressConverter.init(ast, resultObject, enableShortCircuit);
380380
}

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export function convertSQLToAst(filterString, enableConsoleLogs = false) {
1616
return parsedResult;
1717
}
1818

19-
export function convertAstToDevextreme(ast, variables, state) {
20-
return convertToDevExpressFormat({ ast, variables, resultObject: state })
19+
export function convertAstToDevextreme(ast, state, enableShortCircuit = true) {
20+
return convertToDevExpressFormat({ ast, resultObject: state, enableShortCircuit })
2121
}
2222

2323

0 commit comments

Comments
 (0)