redisgraph-go icon indicating copy to clipboard operation
redisgraph-go copied to clipboard

[Fix] Allow CallProcedure to specify mode

Open marcinc opened this issue 1 year ago • 0 comments

This PR addresses #74.

There are few possible solutions to this so I'm happy to address it in a different way if required.

Possible solutions:

  1. (Current one) g.CallProcedure takes an additional mode parameter that tells it whether to run RW or RO query. This however requires the knowledge of what procedure mode is. It can be easily retrieved from the instance by running CALL dbms.procedures() (in read-only mode) which will show the mode required for a specific procedure.

  2. g.CallProcedure can build available procedures lookup by calling dbms.procedures() internally and automatically setting up the mode required for a given procedure call. This however has a downside of additional call for each g.CallProcedure invocation. I've got that solution ready to go if there is preference for it.

marcinc avatar Oct 06 '22 18:10 marcinc