I ask a question because I got curious while reading the manual.
The difference between functions and procedures in apoc is confusing.
- Functions are simple computations / conversions and return a single value
- Functions can be used in any expression or predicate
- Procedures are more complex operations and generate streams of results.
- Procedures must be used within the
YIELDtheir result columns
- They can generate, fetch or compute data to make it available to later processing steps in your Cypher query
According to those manual, functions in neo4j return only one value, and the cardinality of the main query cannot be increased.
But there is a function(not a procedure) that returns multiple results. allshortestPaths
What's going on here? Is this just one exception?
It may seem like nothing, but it's a big problem for me that the cardinality of the set can change, so I want to hear the exact answer to this.