Sometimes when using transactions I want to enforce behavior by setting read-only or isolation level. The current Session.Begin doesn't take any options and when it eventually calls BeginTx to get the underlying sql.Tx it just uses nil for the options.
This change is backward compatible and allows passing sql.TxOptions to BeginWithOpts while Begin retains it's original functionality.
Sometimes when using transactions I want to enforce behavior by setting read-only or isolation level. The current
Session.Begin
doesn't take any options and when it eventually calls BeginTx to get the underlyingsql.Tx
it just usesnil
for the options.This change is backward compatible and allows passing
sql.TxOptions
toBeginWithOpts
whileBegin
retains it's original functionality.Usage: