mirror of https://github.com/jackc/pgx.git
parent
292539a590
commit
1fcefdc73f
2
tx.go
2
tx.go
|
@ -98,7 +98,7 @@ func (c *Conn) BeginFunc(ctx context.Context, f func(Tx) error) (err error) {
|
||||||
// the execution of f.
|
// the execution of f.
|
||||||
func (c *Conn) BeginTxFunc(ctx context.Context, txOptions TxOptions, f func(Tx) error) (err error) {
|
func (c *Conn) BeginTxFunc(ctx context.Context, txOptions TxOptions, f func(Tx) error) (err error) {
|
||||||
var tx Tx
|
var tx Tx
|
||||||
tx, err = c.BeginTx(ctx, TxOptions{})
|
tx, err = c.BeginTx(ctx, txOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue