Add the constructor to in_predicate where we can also accept a vector [API-551]#890
Conversation
…ctor of keys/values for the query. Also added a new test `IssueTest::issue_888` and updated the `ClientMapTest::testValuesWithPredicate` to use a vectory of keys. The query example should also work with this fix. fixes hazelcast#888
|
Windows test PASSed. |
|
Linux test PASSed. |
| } | ||
|
|
||
| template<typename T> | ||
| multi_predicate(const std::string attribute_name, hazelcast_client &client, const std::vector<T> &values) : base_predicate(client) { |
There was a problem hiding this comment.
Why is the hazelcast_client needed to create a predicate? IMO it would be great to get rid of it if possible.
There was a problem hiding this comment.
unfortunately, we need it to access the serialization service. I also do not like it but i had to do it due to the fact that i needed to prepare the binary during construction.
There was a problem hiding this comment.
I see. I wish we could defer binary construction. Taking a client as a parameter has more problems, like would passing a different to multi_predicate than the one calling the actual query cause problems? But I guess this is not something that can be changed in this PR.
There was a problem hiding this comment.
Passing a different client, yes, that may cause a problem if serialization configs are different. Alternative was to use the client as the factory method to create the in_predicate but it again has the same problem if the user would use a client predicate with the other client. I am open to any better solution but could not find one as of yet. Yes, we can open another issue to discuss this topic.
in_predicate where we can also accept a vectorin_predicate where we can also accept a vector [API-551]
|
Windows test PASSed. |
|
Linux test PASSed. |
Added the constructor to
in_predicatewhere we can also accept a vector of keys/values for the query. Also added a new testIssueTest::issue_888and updated theClientMapTest::testValuesWithPredicateto use a vector of keys. The query example should also work with this fix.fixes #888