Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBBranchTracker ¶
type DBBranchTracker struct {
// contains filtered or unexported fields
}
func NewDBBranchTracker ¶
func NewDBBranchTracker() *DBBranchTracker
func (DBBranchTracker) GetBranch ¶
func (dbbt DBBranchTracker) GetBranch() string
func (DBBranchTracker) SetBranch ¶
func (dbbt DBBranchTracker) SetBranch(branch string)
type DBProvider ¶
type DBProvider struct { *DBBranchTracker // contains filtered or unexported fields }
func NewDBProvider ¶
func NewDBProvider(conn *dbr.Connection, database, migrationSchemaDir string) (*DBProvider, error)
func (*DBProvider) Session ¶
func (dbp *DBProvider) Session() *dbr.Session
func (*DBProvider) Transaction ¶
func (dbp *DBProvider) Transaction(ctx context.Context, txFunc func(tx *dbr.Tx) error) error
Transaction executes the txFunc within a transaction. If not committed in the txFunc, the transaction will be rolled back.
Click to show internal directories.
Click to hide internal directories.