Begin starts a transaction. Unlike [database/sql], the context only affects the begin command. i.e. there is no auto-rollback on context cancellation.
(ctx context.Context)
| 92 | // Begin starts a transaction. Unlike [database/sql], the context only affects the begin command. i.e. there is no |
| 93 | // auto-rollback on context cancellation. |
| 94 | func (c *Conn) Begin(ctx context.Context) (Tx, error) { |
| 95 | return c.BeginTx(ctx, TxOptions{}) |
| 96 | } |
| 97 | |
| 98 | // BeginTx starts a transaction with txOptions determining the transaction mode. Unlike [database/sql], the context only |
| 99 | // affects the begin command. i.e. there is no auto-rollback on context cancellation. |