sqlparser-devexpress 2.3.7 → 2.3.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 +1 -1
- package/src/core/converter.js +7 -6
package/package.json
CHANGED
package/src/core/converter.js
CHANGED
|
@@ -138,18 +138,19 @@ function DevExpressConverter() {
|
|
|
138
138
|
const right = ast.right !== undefined ? processAstNode(ast.right) : convertValue(ast.value);
|
|
139
139
|
let operatorToken = ast.operator.toLowerCase();
|
|
140
140
|
|
|
141
|
-
if(operatorToken === "like") {
|
|
141
|
+
if (operatorToken === "like") {
|
|
142
142
|
operatorToken = "contains";
|
|
143
|
-
}else if (operatorToken === "not like") {
|
|
143
|
+
} else if (operatorToken === "not like") {
|
|
144
144
|
operatorToken = "notcontains";
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
let comparison = [left, operatorToken, right];
|
|
148
148
|
|
|
149
|
+
//TODO: the ISNULL custom metadata is causing issues on filters will need to check this on server
|
|
149
150
|
if ((ast.left && isFunctionNullCheck(ast.left, true)) || (ast.value && isFunctionNullCheck(ast.value, false))) {
|
|
150
|
-
comparison = [[left, operatorToken, right], 'or', [left, operatorToken, null, {type: "ISNULL", defaultValue: (ast.left ?? ast.value).args[1]?.value}]];
|
|
151
|
+
comparison = [[left, operatorToken, right], 'or', [left, operatorToken, null,]];// {type: "ISNULL", defaultValue: (ast.left ?? ast.value).args[1]?.value}]];
|
|
151
152
|
} else if (ast.right && isFunctionNullCheck(ast.right, true)) {
|
|
152
|
-
comparison = [[left, operatorToken, right], 'or', [right, operatorToken, null, {type: "ISNULL", defaultValue: ast.right.args[1]?.value}]];
|
|
153
|
+
comparison = [[left, operatorToken, right], 'or', [right, operatorToken, null,]];// {type: "ISNULL", defaultValue: ast.right.args[1]?.value}]];
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
// Apply short-circuit evaluation if enabled
|
|
@@ -229,8 +230,8 @@ function DevExpressConverter() {
|
|
|
229
230
|
if (typeof val === "object") {
|
|
230
231
|
if (val.type === "placeholder") {
|
|
231
232
|
const placeholderValue = resolvePlaceholderFromResultObject(val.value);
|
|
232
|
-
|
|
233
|
-
if(val?.dataType === "string"){
|
|
233
|
+
|
|
234
|
+
if (val?.dataType === "string") {
|
|
234
235
|
return placeholderValue?.toString();
|
|
235
236
|
}
|
|
236
237
|
|