ksql

package
v4.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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