Skip to content

Commit

Permalink
Parse in bindings as a single list binding
Browse files Browse the repository at this point in the history
Change-type: major
  • Loading branch information
otaviojacobi committed Jan 14, 2025
1 parent 31da05d commit 5b99955
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"license": "BSD",
"dependencies": {
"@balena/abstract-sql-compiler": "^10.0.1",
"@balena/odata-parser": "^3.1.0",
"@balena/odata-parser": "4.0.0-build-in-with-single-array-bind-d19b60e5320e839cbf626e1e1cb9ac019adf86bb-1",
"@types/lodash": "^4.17.10",
"@types/memoizee": "^0.4.11",
"@types/string-hash": "^1.1.3",
Expand Down
2 changes: 1 addition & 1 deletion src/odata-to-abstract-sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ export class OData2AbstractSQL {
return [
'In',
this.Operand(rest[0]),
...rest[1].map((v: any) => this.Operand(v)),
this.Operand(rest[1]),
] as InNode;
}
case 'call': {
Expand Down
4 changes: 1 addition & 3 deletions test/filterby.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ const createExpression = function (lhs, op, rhs) {
if (op === 'in') {
return {
odata: operandToOData(lhs) + ' ' + op + ' ' + operandToOData(rhs),
abstractsql: [sqlOps[op], operandToAbstractSQL(lhs)].concat(
operandToAbstractSQL(rhs),
),
abstractsql: [sqlOps[op], operandToAbstractSQL(lhs), ['Bind', 0]],
};
}
if (rhs == null) {
Expand Down

0 comments on commit 5b99955

Please sign in to comment.