Documentation ¶
Index ¶
- Variables
- func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)
- type Config
- type Singlestore
- func (m *Singlestore) Close() error
- func (m *Singlestore) Drop() (err error)
- func (m *Singlestore) ListAppliedVersions() ([]int, error)
- func (m *Singlestore) Lock() error
- func (m *Singlestore) Open(url string) (database.Driver, error)
- func (m *Singlestore) Run(migration io.Reader) error
- func (m *Singlestore) SetSourceDriver(sourceDrv source.Driver) error
- func (m *Singlestore) SetVersion(version int, dirty bool, forced bool, knownDirection *source.Direction) (*source.Direction, error)
- func (m *Singlestore) Unlock() error
- func (m *Singlestore) Version() (version int, dirty bool, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultMigrationsTable = "schema_migrations" DefaultHistoryTable = "schema_migrations_history" )
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") )
Functions ¶
Types ¶
type Singlestore ¶
type Singlestore struct {
// contains filtered or unexported fields
}
func WithConnection ¶
connection instance must have `multiStatements` set to true
func (*Singlestore) Close ¶
func (m *Singlestore) Close() error
func (*Singlestore) Drop ¶
func (m *Singlestore) Drop() (err error)
func (*Singlestore) ListAppliedVersions ¶
func (m *Singlestore) ListAppliedVersions() ([]int, error)
func (*Singlestore) Lock ¶
func (m *Singlestore) Lock() error
func (*Singlestore) SetSourceDriver ¶
func (m *Singlestore) SetSourceDriver(sourceDrv source.Driver) error
func (*Singlestore) SetVersion ¶
func (*Singlestore) Unlock ¶
func (m *Singlestore) Unlock() error
Click to show internal directories.
Click to hide internal directories.