glerchundi / sqlboiler-crdb

23 stars 20 forks source link

Should retry logic be added #36

Open colinclerk opened 3 years ago

colinclerk commented 3 years ago

CRDB has documentation for adding client side retries to drivers: https://www.cockroachlabs.com/docs/stable/advanced-client-side-transaction-retries.html

I do not see this logic in the source code (confirmed by searching for "SAVEPOINT" keyword). Should this be added to sqlboiler-crdb, or was it intentionally excluded?

glerchundi commented 3 years ago

I prefer to keep the generated code as simple as possible adding retry logic would complicate things a lot and the maintenance time would be much more.

Furthermore I think that retry can be "easily" applied at the driver level (by creating a wrapping driver or something similar) as well making it a cleaner solution.