Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction represents an sql transaction
func Build ¶
func Build(tx *sql.Tx, id int64, rollbackFlag bool) *Transaction
Build Creates a new transaction object
func (*Transaction) Commit ¶
func (tx *Transaction) Commit() error
func (*Transaction) MarkedForRollback ¶
func (tx *Transaction) MarkedForRollback() bool
MarkedForRollback returns true if a transaction is flagged for rollback and false otherwise.
func (*Transaction) Rollback ¶
func (tx *Transaction) Rollback() error
rollback ends the transaction by rolling back
func (*Transaction) SetRollbackFlag ¶
func (tx *Transaction) SetRollbackFlag(flag bool)
func (*Transaction) Tx ¶
func (tx *Transaction) Tx() *sql.Tx
func (*Transaction) TxID ¶
func (tx *Transaction) TxID() int64
Click to show internal directories.
Click to hide internal directories.