Question: Predicates as a static and building complex expressions #855
Labels
Source: Community
Originated from the Community.
Type: Question
Issue is a Question or a Discussion.
My main issue is that Predicates is a static class and I need to build the predicates value within a reusable method with fairly complex logic which can't simply be created with a single expression. The conditions used are configurable so I can't simply hardcode a simple set of statements; I need a reusable method to create the Predicates / query conditions.
PredicateBuilder is strictly internal with the .net client so I can't use instances of that.
To put it another way, I have a complex calculated Lambda expression (System.Linq.Expression) I need to convert to Predicates and use for querying Hazelcast without simply pulling the entire set of records into a list first or building the results one record at a within an Enumerator.
Could anyone offer some insights or suggestions on how to accomplish this? It seems like I could have done this with the Java client but not the .net client but I never used that language with Hazelcast.
Thanks!
Edit: Building sql conditions and using the SQL predicate instead worked. I would suggest perhaps adding functionality to PredicateBuilder to be able to instantiate an objects with the predicate conditions with a method for ToPredicates() to return the static Predicates might be helpful.
The text was updated successfully, but these errors were encountered: