Fix spelling
This commit is contained in:
@@ -66,13 +66,13 @@ var ErrTxClosed = errors.New("tx is closed")
|
|||||||
var ErrTxCommitRollback = errors.New("commit unexpectedly resulted in rollback")
|
var ErrTxCommitRollback = errors.New("commit unexpectedly resulted in rollback")
|
||||||
|
|
||||||
// Begin starts a transaction. Unlike database/sql, the context only affects the begin command. i.e. there is no
|
// Begin starts a transaction. Unlike database/sql, the context only affects the begin command. i.e. there is no
|
||||||
// auto-rollback on context cancelation.
|
// auto-rollback on context cancellation.
|
||||||
func (c *Conn) Begin(ctx context.Context) (*dbTx, error) {
|
func (c *Conn) Begin(ctx context.Context) (*dbTx, error) {
|
||||||
return c.BeginTx(ctx, TxOptions{})
|
return c.BeginTx(ctx, TxOptions{})
|
||||||
}
|
}
|
||||||
|
|
||||||
// BeginTx starts a transaction with txOptions determining the transaction mode. Unlike database/sql, the context only
|
// BeginTx starts a transaction with txOptions determining the transaction mode. Unlike database/sql, the context only
|
||||||
// affects the begin command. i.e. there is no auto-rollback on context cancelation.
|
// affects the begin command. i.e. there is no auto-rollback on context cancellation.
|
||||||
func (c *Conn) BeginTx(ctx context.Context, txOptions TxOptions) (*dbTx, error) {
|
func (c *Conn) BeginTx(ctx context.Context, txOptions TxOptions) (*dbTx, error) {
|
||||||
_, err := c.Exec(ctx, txOptions.beginSQL())
|
_, err := c.Exec(ctx, txOptions.beginSQL())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user