RedisGraph / redisgraph-go

A Golang client for redisgraph
https://redisgraph.io
BSD 3-Clause "New" or "Revised" License
132 stars 38 forks source link

[Fix] Allow CallProcedure to specify mode #75

Open marcinc opened 2 years ago

marcinc commented 2 years ago

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.