ksql

package
v4.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateMigrationStreamSQL = `` /* 201-byte string literal not displayed */
View Source
var CreateMigrationTableSQL = `` /* 195-byte string literal not displayed */
View Source
var LatestSchemaMigrationSql = `SELECT * FROM migrations WHERE rowtime = %v LIMIT 1;`
View Source
var LatestSchemaRowTimeSQL = `SELECT * FROM schema_migrations WHERE type = 'schema' LIMIT 1;`

Functions

This section is empty.

Types

type Config

type Config struct{}

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) Close

func (s *Ksql) Close() error

func (*Ksql) Drop

func (s *Ksql) Drop() error

func (*Ksql) Lock

func (s *Ksql) Lock() error

func (*Ksql) Open

func (s *Ksql) Open(url string) (database.Driver, error)

func (*Ksql) Run

func (s *Ksql) Run(migration io.Reader) error

func (*Ksql) SetVersion

func (s *Ksql) SetVersion(version int, dirty bool) error

Adds a new record with the current migration version and it's dirty state

func (*Ksql) Unlock

func (s *Ksql) Unlock() error

func (*Ksql) Version

func (s *Ksql) Version() (version int, dirty bool, err error)

Retrieves the current version of the KSQL migration state

type MigrationResult

type MigrationResult struct {
	Row MigrationRow
}

type MigrationRow

type MigrationRow struct {
	Columns []interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL