sqlparser-devexpress 2.5.2 → 2.5.3

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.5.2",
3
+ "version": "2.5.3",
4
4
  "main": "src/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -32,4 +32,4 @@
32
32
  "devDependencies": {
33
33
  "vitest": "^3.0.5"
34
34
  }
35
- }
35
+ }
@@ -402,8 +402,11 @@ function DevExpressConverter() {
402
402
  function resolvePlaceholderFromResultObject(placeholder) {
403
403
  if (!resultObject) return `{${placeholder}}`;
404
404
 
405
+ // Case-insensitive lookup
406
+ const lowerPlaceholder = placeholder.toLowerCase();
407
+ const matchingKey = Object.keys(resultObject).find(key => key.toLowerCase() === lowerPlaceholder);
405
408
 
406
- return resultObject.hasOwnProperty(placeholder) ? resultObject[placeholder] : `{${placeholder.value ?? placeholder}}`;
409
+ return matchingKey ? resultObject[matchingKey] : `{${placeholder.value ?? placeholder}}`;
407
410
  }
408
411
 
409
412
  /**
@@ -401,6 +401,12 @@ describe("Parser SQL to dx Filter Builder", () => {
401
401
  "and",
402
402
  ["ItemGroupType", "=", "1"]
403
403
  ]
404
+ },
405
+ {
406
+ input: "AccountID = {AccountingRule.CompanyId}",
407
+ expected: [
408
+ "AccountID", "=", 42
409
+ ]
404
410
  }
405
411
  ];
406
412