Documentation
¶
Index ¶
- Variables
- type Config
- type Ksql
- func (s *Ksql) Close() error
- func (s *Ksql) Drop() error
- func (s *Ksql) Lock() error
- func (s *Ksql) Open(url string) (database.Driver, error)
- func (s *Ksql) Run(migration io.Reader) error
- func (s *Ksql) SetVersion(version int, dirty bool) error
- func (s *Ksql) Unlock() error
- func (s *Ksql) Version() (version int, dirty bool, err error)
- type MigrationResult
- type MigrationRow
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateMigrationStreamSQL = `` /* 186-byte string literal not displayed */
View Source
var CreateMigrationTableSQL = `CREATE TABLE s_mgrt AS
SELECT MAX(ROWTIME), type FROM mgrt GROUP BY type;`
View Source
var LatestSchemaMigrationSql = `SELECT * FROM mgrt WHERE rowtime = %v LIMIT 1;`
View Source
var LatestSchemaRowTimeSQL = `SELECT * FROM s_mgrt WHERE type = 'schema' LIMIT 1;`
Functions ¶
This section is empty.
Types ¶
type Ksql ¶
type Ksql struct {
Url string
HttpUrl string
Instance interface{}
CurrentVersion int
MigrationSequence []string
LastRunMigration []byte // todo: make []string
IsDirty bool
FirstRun bool
Client *http.Client
Config *Config
}
func (*Ksql) SetVersion ¶
Adds a new record with the current migration version and it's dirty state
type MigrationResult ¶
type MigrationResult struct {
Row MigrationRow
}
type MigrationRow ¶
type MigrationRow struct {
Columns []interface{}
}
Click to show internal directories.
Click to hide internal directories.