-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADD subscription expression evaluation #1687
Conversation
* I don't like too much to have a function with two quite parallel behaviours in the same logic. Probably a | ||
* smarter design will be to divide this function in two part: the one focused in string parsing and the one | ||
* focused in appliying filters to each different sytem (either in memory or as BSON). | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opinions on the above comment and ideas to improve the current implementation are welcome :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, you have already split the function in two. Very little common code, just go all the way (which means we'll have some code duplicated). I don't see any problem with that.
I also don't see any problem in keeping it the way it is now. A 'fork function'.
What is not very nice is the 'two out of three parameters', that's all.
# 06. Dump accumulator (2 notifications) | ||
# | ||
|
||
echo "01. Create subscription with q: colour!=black,white" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!= => ==
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 39c2584
@@ -112,6 +112,25 @@ std::string ContextElement::render(ConnectionInfo* ciP, RequestType requestType, | |||
|
|||
/* **************************************************************************** | |||
* | |||
* ContextElement::getAttribute | |||
*/ | |||
ContextAttribute* ContextElement::getAttribute(std::string attrName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would probably have been better to implement a 'lookup' method for ContextAttributeVector, but, never mind.
NTC
LGTM |
1 similar comment
LGTM |
…_filters_ngsiv2 ADD subscription expression evaluation
Implements part of #1316
@kzangeli
@crbrox