mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
dialect/sql: type alias txoptions
Reviewed By: alexsn Differential Revision: D18689199 fbshipit-source-id: 7606a3a24beb286d464b64eb2e51a1257fbffdcd
This commit is contained in:
committed by
Facebook Github Bot
parent
1bf83dd65f
commit
be307dab3c
@@ -55,7 +55,7 @@ func (d *Driver) Tx(ctx context.Context) (dialect.Tx, error) {
|
||||
}
|
||||
|
||||
// BeginTx starts a transaction with options.
|
||||
func (d *Driver) BeginTx(ctx context.Context, opts *sql.TxOptions) (dialect.Tx, error) {
|
||||
func (d *Driver) BeginTx(ctx context.Context, opts *TxOptions) (dialect.Tx, error) {
|
||||
tx, err := d.ExecQuerier.(*sql.DB).BeginTx(ctx, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -139,4 +139,6 @@ type (
|
||||
NullString = sql.NullString
|
||||
// NullFloat64 is an alias to sql.NullFloat64.
|
||||
NullFloat64 = sql.NullFloat64
|
||||
// TxOptions holds the transaction options to be used in DB.BeginTx.
|
||||
TxOptions = sql.TxOptions
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user