Adding upstream version 1.11.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
40df376a7f
commit
02cacc5b45
37 changed files with 7317 additions and 0 deletions
23
tx.go
Normal file
23
tx.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2016 Qiang Xue. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package dbx
|
||||
|
||||
import "database/sql"
|
||||
|
||||
// Tx enhances sql.Tx with additional querying methods.
|
||||
type Tx struct {
|
||||
Builder
|
||||
tx *sql.Tx
|
||||
}
|
||||
|
||||
// Commit commits the transaction.
|
||||
func (t *Tx) Commit() error {
|
||||
return t.tx.Commit()
|
||||
}
|
||||
|
||||
// Rollback aborts the transaction.
|
||||
func (t *Tx) Rollback() error {
|
||||
return t.tx.Rollback()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue