jrgemignani commented on issue #1990:
URL: https://github.com/apache/age/issues/1990#issuecomment-2258585426

   @MironAtHome Just understand that it wasn't intended nor expected to be used 
outside of this [security issue] context. So it may not work as expected. And, 
come to think of it, it may not work in parallel. I need to think about the 
latter.
   
   The general idea behind it was to allow parameters to be passed to the 
`cypher()` function. The issue being that `cypher($1, $2)` doesn't work due to 
when parameters `($1, $2)` are resolved (in the execution phase) and when they 
are needed (in the cypher parse phase which comes before the execution phase).
   
   By using `age_prepare_cypher($1, $2)` the parameters are resolved at 
execution and a global structure for that specific process is set up to 
contain, for one time only, the graph name and cypher command. The very next 
command needs to be `cypher(NULL, NULL)`. Any other cypher command will error 
out and reset it. That next `cypher(NULL, NULL)` will then use those resolved 
parameters. The structure is then cleared.
   
   That is basically how the two commands work together `age_prepare_cypher($1, 
$2)` then `cypher(NULL, NULL)`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to