Documentation ¶
Index ¶
- Variables
- func WithInstance(ctx context.Context, instance *sql.DB, config *Config) (database.Driver, error)
- type Config
- type Mysql
- func (m *Mysql) Close() error
- func (m *Mysql) Drop() (err error)
- func (m *Mysql) Lock() error
- func (m *Mysql) Open(url string) (database.Driver, error)
- func (m *Mysql) Run(migration io.Reader) error
- func (m *Mysql) SetVersion(version int, dirty bool) error
- func (m *Mysql) Unlock() error
- func (m *Mysql) Version() (version int, dirty bool, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDatabaseDirty = fmt.Errorf("database is dirty") ErrNilConfig = fmt.Errorf("no config") ErrNoDatabaseName = fmt.Errorf("no database name") ErrAppendPEM = fmt.Errorf("failed to append PEM") ErrTLSCertKeyConfig = fmt.Errorf("To use TLS client authentication, both x-tls-cert and x-tls-key must not be empty") )
View Source
var DefaultMigrationsTable = "schema_migrations"
Functions ¶
Types ¶
type Mysql ¶
type Mysql struct {
// contains filtered or unexported fields
}
func WithConnection ¶
connection instance must have `multiStatements` set to true
Click to show internal directories.
Click to hide internal directories.