dialectquery

package
v3.20.8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clickhouse

type Clickhouse struct {
	Table string
}

func (*Clickhouse) CreateTable

func (c *Clickhouse) CreateTable() string

func (*Clickhouse) DeleteVersion

func (c *Clickhouse) DeleteVersion() string

func (*Clickhouse) GetMigrationByVersion

func (c *Clickhouse) GetMigrationByVersion() string

func (*Clickhouse) InsertVersion

func (c *Clickhouse) InsertVersion() string

func (*Clickhouse) ListMigrations

func (c *Clickhouse) ListMigrations() string

type Mysql

type Mysql struct {
	Table string
}

func (*Mysql) CreateTable

func (m *Mysql) CreateTable() string

func (*Mysql) DeleteVersion

func (m *Mysql) DeleteVersion() string

func (*Mysql) GetMigrationByVersion

func (m *Mysql) GetMigrationByVersion() string

func (*Mysql) InsertVersion

func (m *Mysql) InsertVersion() string

func (*Mysql) ListMigrations

func (m *Mysql) ListMigrations() string

type Postgres

type Postgres struct {
	Table string
}

func (*Postgres) CreateTable

func (p *Postgres) CreateTable() string

func (*Postgres) DeleteVersion

func (p *Postgres) DeleteVersion() string

func (*Postgres) GetMigrationByVersion

func (p *Postgres) GetMigrationByVersion() string

func (*Postgres) InsertVersion

func (p *Postgres) InsertVersion() string

func (*Postgres) ListMigrations

func (p *Postgres) ListMigrations() string

type Querier

type Querier interface {
	// CreateTable returns the SQL query string to create the db version table.
	CreateTable() string

	// InsertVersion returns the SQL query string to insert a new version into
	// the db version table.
	InsertVersion() string

	// DeleteVersion returns the SQL query string to delete a version from
	// the db version table.
	DeleteVersion() string

	// GetMigrationByVersion returns the SQL query string to get a single
	// migration by version.
	//
	// The query should return the timestamp and is_applied columns.
	GetMigrationByVersion() string

	// ListMigrations returns the SQL query string to list all migrations in
	// descending order by id.
	//
	// The query should return the version_id and is_applied columns.
	ListMigrations() string
}

Querier is the interface that wraps the basic methods to create a dialect specific query.

type Redshift

type Redshift struct {
	Table string
}

func (*Redshift) CreateTable

func (r *Redshift) CreateTable() string

func (*Redshift) DeleteVersion

func (r *Redshift) DeleteVersion() string

func (*Redshift) GetMigrationByVersion

func (r *Redshift) GetMigrationByVersion() string

func (*Redshift) InsertVersion

func (r *Redshift) InsertVersion() string

func (*Redshift) ListMigrations

func (r *Redshift) ListMigrations() string

type Sqlite3

type Sqlite3 struct {
	Table string
}

func (*Sqlite3) CreateTable

func (s *Sqlite3) CreateTable() string

func (*Sqlite3) DeleteVersion

func (s *Sqlite3) DeleteVersion() string

func (*Sqlite3) GetMigrationByVersion

func (s *Sqlite3) GetMigrationByVersion() string

func (*Sqlite3) InsertVersion

func (s *Sqlite3) InsertVersion() string

func (*Sqlite3) ListMigrations

func (s *Sqlite3) ListMigrations() string

type Sqlserver

type Sqlserver struct {
	Table string
}

func (*Sqlserver) CreateTable

func (s *Sqlserver) CreateTable() string

func (*Sqlserver) DeleteVersion

func (s *Sqlserver) DeleteVersion() string

func (*Sqlserver) GetMigrationByVersion

func (s *Sqlserver) GetMigrationByVersion() string

func (*Sqlserver) InsertVersion

func (s *Sqlserver) InsertVersion() string

func (*Sqlserver) ListMigrations

func (s *Sqlserver) ListMigrations() string

type Tidb

type Tidb struct {
	Table string
}

func (*Tidb) CreateTable

func (t *Tidb) CreateTable() string

func (*Tidb) DeleteVersion

func (t *Tidb) DeleteVersion() string

func (*Tidb) GetMigrationByVersion

func (t *Tidb) GetMigrationByVersion() string

func (*Tidb) InsertVersion

func (t *Tidb) InsertVersion() string

func (*Tidb) ListMigrations

func (t *Tidb) ListMigrations() string

type Vertica

type Vertica struct {
	Table string
}

func (*Vertica) CreateTable

func (v *Vertica) CreateTable() string

func (*Vertica) DeleteVersion

func (v *Vertica) DeleteVersion() string

func (*Vertica) GetMigrationByVersion

func (v *Vertica) GetMigrationByVersion() string

func (*Vertica) InsertVersion

func (v *Vertica) InsertVersion() string

func (*Vertica) ListMigrations

func (v *Vertica) ListMigrations() string

Jump to

Keyboard shortcuts

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