我想使用 cypher 将关系传递给我的 neography 查询,并让查询在该关系上执行。
我目前收到一个错误:
query_response = @neo.execute_query("MATCH (fromNode)-[{relationship}]->(toNode)
WHERE fromNode.bot_client_id = {bot_client_id} AND toNode.epoch_utc_i > {fromTime} AND toNode.epoch_utc_i < {toTime}
RETURN toNode.value
LIMIT {limit}",
{
:fromTime => fromTime, :toTime => toTime, :bot_client_id => @bot_client_id,
:limit => limit, :relationship => relationship.to_sym
}
)
Neography::SyntaxException: Parameter maps cannot be used in MATCH patterns (use a literal map instead, eg. "{id: {param}.id}") (line 1, column 21 (offset: 20))
"MATCH (fromNode)-[{relationship}]->(toNode) "