From d3768c740a6f77bb130b68f4944931392a70b462 Mon Sep 17 00:00:00 2001 From: Kyriakos Barbounakis Date: Wed, 14 Aug 2024 11:07:46 +0300 Subject: [PATCH] use expression while resolving member (#96) * use expression while resolving member * 2.14.1 --- package-lock.json | 4 ++-- package.json | 2 +- src/odata.js | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5948922..d56b317 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@themost/query", - "version": "2.14.0", + "version": "2.14.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@themost/query", - "version": "2.14.0", + "version": "2.14.1", "license": "BSD-3-Clause", "dependencies": { "@themost/events": "^1.0.5", diff --git a/package.json b/package.json index 3d31108..7a23dfb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@themost/query", - "version": "2.14.0", + "version": "2.14.1", "description": "MOST Web Framework Codename ZeroGravity - Query Module", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", diff --git a/src/odata.js b/src/odata.js index 166b6af..4ddff74 100644 --- a/src/odata.js +++ b/src/odata.js @@ -8,7 +8,7 @@ import { ComparisonExpression, MethodCallExpression, MemberExpression, - SwitchExpression + SwitchExpression, Expression } from './expressions'; import { SelectAnyExpression, AnyExpressionFormatter } from './expressions'; import { OrderByAnyExpression } from './expressions'; @@ -796,6 +796,9 @@ class OpenDataParser { } //search for multiple nested member expression (e.g. a/b/c) self.resolveMember(identifier, function (err, member) { + if (member instanceof Expression) { + return callback(null, member); + } callback.call(self, err, new MemberExpression(member)); }); } @@ -1630,4 +1633,4 @@ export { IdentifierToken, SyntaxToken, OpenDataParser -} \ No newline at end of file +}