diff --git a/package.json b/package.json index 5424d34..8b70a57 100644 --- a/package.json +++ b/package.json @@ -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-4b97fb54e68b9b2f5e80540a99db81cdf7abbc55-1", "@types/lodash": "^4.17.10", "@types/memoizee": "^0.4.11", "@types/string-hash": "^1.1.3", diff --git a/src/odata-to-abstract-sql.ts b/src/odata-to-abstract-sql.ts index 64c7d01..cc5f8a6 100644 --- a/src/odata-to-abstract-sql.ts +++ b/src/odata-to-abstract-sql.ts @@ -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': { diff --git a/test/filterby.js b/test/filterby.js index 5bd5e3c..7eb10fc 100644 --- a/test/filterby.js +++ b/test/filterby.js @@ -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) {