Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrForeignTables = fmt.Errorf("the database contains foreign tables")
View Source
var ErrNotOwned = fmt.Errorf("the database is owned by")
View Source
var ErrUnsupportedDatabaseVersion = fmt.Errorf("unsupported database schema version")
Functions ¶
This section is empty.
Types ¶
type ContextExecable ¶
type Database ¶
type Database struct { *sql.DB Owner string VersionTable string Log log.Logger Dialect Dialect UpgradeTable UpgradeTable IgnoreForeignTables bool IgnoreUnsupportedDatabase bool }
func NewFromConfig ¶
func NewFromConfig(owner string, cfg bridgeconfig.DatabaseConfig, dbLog log.Logger) (*Database, error)
func NewWithDialect ¶
type UpgradeTable ¶
type UpgradeTable []upgrade
func (*UpgradeTable) Register ¶
func (ut *UpgradeTable) Register(from, to int, message string, fn upgradeFunc)
func (*UpgradeTable) RegisterFS ¶
func (ut *UpgradeTable) RegisterFS(fs fullFS)
func (*UpgradeTable) RegisterFSPath ¶
func (ut *UpgradeTable) RegisterFSPath(fs fullFS, dir string)
Click to show internal directories.
Click to hide internal directories.