I have a UserRepository class that extends GraphRepository:
public interface UserRepository extends GraphRepository<User> {
@Query("MATCH (User:_User) WHERE User.network = {0} RETURN User")
Iterable<User> executeFilterTest(String filterValue);
}
The problem is I don't always know exactly what the 'WHERE' part of the query will have. So I want to be able to send in the WHERE part as a parameter like this:
@Query("MATCH (User:_User) {0} RETURN User")
Iterable<User> executeFilterTest(String whereValue);
Is it possible to do something like this? Or can I somehow save the whole Cypher query as a String and then send in the whole String as a parameter?