Search code examples
memgraphdb

What the difference between Cypher procedure and function in Memgraph?


I see that Cypher has both procedures and functions. What is the difference between those two in Cypher implementation in Memgraph?


Solution

  • Bothe of those are defined in openCypher. It's defined in the openCypher, long story short, procedure can be called after CALL clause, usually it's a bit bigger chunk of work; while functions can be called as a part of any expression, e.g., in the WHERE clause. Both procedures and functions can be be part of query modules; one module can have many procedures or functions.