Documentation
¶
Index ¶
- Variables
- func FilterCustomQuery(u *nurl.URL) *nurl.URL
- func GenerateAdvisoryLockId(databaseName string) (string, error)
- func PopulateConfig(driver *Driver, instance *sql.DB, config *Config) error
- type Config
- type Driver
- func (driver *Driver) Close() error
- func (driver *Driver) Execute(statement string) error
- func (driver *Driver) FilenameExtension() string
- func (driver *Driver) Initialize(url string) error
- func (driver *Driver) Migrate(f file.File, pipe chan interface{})
- func (driver *Driver) SetDB(db *sql.DB)
- func (driver *Driver) Version() (file.Version, error)
- func (driver *Driver) Versions() (file.Versions, error)
- type Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilConfig = fmt.Errorf("no config") ErrNoDatabaseName = fmt.Errorf("no database name") )
View Source
var DefaultLockTable = "schema_lock"
View Source
var DefaultMigrationsTable = "schema_migrations"
Functions ¶
func FilterCustomQuery ¶
FilterCustomQuery filters all query values starting with `x-`
func GenerateAdvisoryLockId ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) FilenameExtension ¶
FilenameExtension returns "sql".
func (*Driver) Initialize ¶
Initialize opens and verifies the database handle.
type Error ¶
type Error struct { // Optional: the line number Line uint // Query is a query excerpt Query []byte // Err is a useful/helping error message for humans Err string // OrigErr is the underlying error OrigErr error }
Error should be used for errors involving queries ran against the database
Click to show internal directories.
Click to hide internal directories.