November 2022
Intermediate to advanced
294 pages
5h 58m
English
Cypher supports querying with parameters.[42] This simplifies query reuse and makes caching of execution plans easier, in turn leading to faster query execution times.
The Bolt.Sips module allows us to pass our parameters as a map in a third argument to the query/3 function. (The first argument is the database connection, and the second is the query string.)
But the query functions we’ve created so far take the query string and implicitly supply the database connection. We’ll need to do something about that.
We’ve already updated the GraphCommons.Service behaviour with a couple of optional callbacks:
| | @optional_callbacks query_graph: 2 |
| | @optional_callbacks query_graph!: 2 |
| | |
| | @callback query_graph(GraphCommons.Query.t(), ... |
Read now
Unlock full access