Hello :)
I am trying to achieve some sort of dynamic querying, but I'm a beginner, so maybe my request doesn't make sense or is not canonic.
So, I have a dictionnary of key/value pairs. This dictionnary lenght is not fixed. Sometimes if can be empty, sometimes it can have 2 rows, sometimes 10 rows.
I want to be able to forward this dictionnary to a Cypher query, and be able to "loop" through it, and only return item
if all the MATCH have been successful.
Here is some (very) pseudo-code:
my_dictionnary = {
'file_type': 'scene',
'software': 'after-effect',
'category': 'character',
'task': 'color-grade',
}
for group_name, tag_name in my_dictionnary:
MATCH (item:Item)-[:PARENT]->(group:Group {name: $group_name})-[:TAGGED]->(tag:Tag {name: $tag_name})
if all matches:
RETURN item
Does that make sense, or am I going the wrong way? How could I achieve that?
(I never struggled that much to formulate a problem, that must be a bad sign)
Thanks a lot!