Closed sbowman closed 8 years ago
We predominately use SQL statements so it's never come up. It's easy to add. I prefer a single For
method
// For("update")
// For("share")
For(options ...string)
rather than
ForShare(options ...string)
ForUpdate(options ...string)
Thoughts?
I agree. A For() method would be way more flexible than individual methods.
What's about type safety? From that perspective ForShare
/ ForUpdate
is a better option.
@alkchr Unfortunately, there are 4 variations of For
with options in PG 9.5. Who knows if the PG team will add more in the future. I'd rather not pollute the API surface with every variant.
It would be nice to have a ForUpdate function in the SelectBuilder for working with transactions and row-level locking.
Or is there another approach I'm missing?