When writing transactions, I write a few sqlc queries then write a custom RPC in the proto in order to run the queries as a transaction.
The issue I find is that all of these subqueries become externally accessible via the RPC because they all get added.
Have you thought of a way to encapsulate these types of internal queries so they aren't exported to the proto?
It would keep the proto cleaner and also means (as part of a larger team) that team members don't need to be aware of the hidden dangers of calling the wrong RPC individually when it was meant only to run as part of a larger transaction.
When writing transactions, I write a few sqlc queries then write a custom RPC in the proto in order to run the queries as a transaction.
The issue I find is that all of these subqueries become externally accessible via the RPC because they all get added.
Have you thought of a way to encapsulate these types of internal queries so they aren't exported to the proto?
It would keep the proto cleaner and also means (as part of a larger team) that team members don't need to be aware of the hidden dangers of calling the wrong RPC individually when it was meant only to run as part of a larger transaction.