Skip to content

Commit

Permalink
use expression when resolving member (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarbounakis authored Dec 17, 2024
1 parent d749752 commit d1fd93b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
7 changes: 5 additions & 2 deletions odata.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var {SwitchExpression, SelectAnyExpression, OrderByAnyExpression, AnyExpressionF
createLogicalExpression, isArithmeticOperator, createArithmeticExpression,
isArithmeticExpression, isLogicalExpression, isComparisonOperator,
createMemberExpression,
createComparisonExpression, isMethodCallExpression, isMemberExpression} = require('./expressions');
createComparisonExpression, isMethodCallExpression, isMemberExpression, Expression} = require('./expressions');
var {whilst, series} = require('async');
const { MethodCallExpression } = require('./expressions');
/**
Expand Down Expand Up @@ -909,7 +909,10 @@ OpenDataParser.prototype.parseMember = function(callback) {
}
//search for multiple nested member expression (e.g. a/b/c)
self.resolveMember(identifier, function(err, member) {
callback.call(self, err, createMemberExpression(member));
if (member instanceof Expression) {
return callback.call(self, err, member);
}
return callback.call(self, err, createMemberExpression(member));
});
}
}
Expand Down
26 changes: 6 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@themost/query",
"version": "2.5.30",
"version": "2.6.0",
"description": "@themost/query is a query builder for SQL. It includes a wide variety of helper functions for building complex SQL queries under node.js.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit d1fd93b

Please sign in to comment.