func (dbc *Connection) BeginContext(ctx context.Context, opts ...func(*sql.TxOptions)) (*sql.Tx, error) {
	if dbc.Connection == nil {
		return nil, ex.New(ErrConnectionClosed)
	}
	var txOptions sql.TxOptions
	for _, opt := range opts {
		opt(&txOptions)
	}
	tx, err := dbc.Connection.BeginTx(ctx, &txOptions)
	return tx, Error(err)
}
// BeginContext starts a new transaction in a givent context.
BeginContext starts a new transaction in a givent context.
// BeginContext starts a new transaction in a givent context .
func (dbc *Connection) BeginContext(ctx context.Context, opts ...func(*sql.TxOptions)) (*sql.Tx, error) {
	if dbc.Connection == nil {
		return nil, ex.New(ErrConnectionClosed)
	}
	var txOptions sql.TxOptions
	for _, opt := range opts {
		opt(&txOptions)
	}
	tx, err := dbc.Connection.BeginTx(ctx, &txOptions)
	return tx, Error(err)
}
func ( dbc * Connection ) BeginContext ( ctx context . Context , opts ... func ( * sql . TxOptions ) ) ( * sql . Tx , error ) { if dbc . Connection == nil { return nil , ex . New ( ErrConnectionClosed ) } var txOptions sql . TxOptions for _ , opt := range opts { opt ( & txOptions ) } tx , err := dbc . Connection . BeginTx ( ctx , & txOptions ) return tx , Error ( err ) }
BeginContext starts a new transaction in a givent context.
BeginContext starts a new transaction in a givent context .