Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found row") ErrDuplicated = errors.New("duplicated row") )
Functions ¶
This section is empty.
Types ¶
type DeadlockError ¶
type DeadlockError interface {
IsDeadlock() bool
}
type DuplicatedError ¶
type DuplicatedError interface {
IsDuplicated() bool
}
type NotFoundError ¶
type NotFoundError interface {
IsNotFound() bool
}
type Transaction ¶
type Transaction interface { Queryer // Begin starts this transactoin. Begin should start a new fresh transaction if it // is called on an already finished (committed or rollbacked) transaction. Begin() error Commit() error Rollback() error // Error returns the last TransactionError, if any, that was encountered during // query and commit processes. Error() TransactionError }
Transaction provides a database transaction. Transaction should return TransactionError when an error occurs.
type TransactionError ¶
type TransactionError interface { error DeadlockError NotFoundError DuplicatedError }
type TransactionManager ¶
type TransactionManager interface {
NewTransaction() Transaction
}
Click to show internal directories.
Click to hide internal directories.