dialectquery

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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{}

func (*Clickhouse) CreateTable

func (c *Clickhouse) CreateTable(tableName string) string

func (*Clickhouse) DeleteVersion

func (c *Clickhouse) DeleteVersion(tableName string) string

func (*Clickhouse) GetMigrationByVersion

func (c *Clickhouse) GetMigrationByVersion(tableName string) string

func (*Clickhouse) InsertVersion

func (c *Clickhouse) InsertVersion(tableName string) string

func (*Clickhouse) ListMigrations

func (c *Clickhouse) ListMigrations(tableName string) string

type Mysql

type Mysql struct{}

func (*Mysql) CreateTable

func (m *Mysql) CreateTable(tableName string) string

func (*Mysql) DeleteVersion

func (m *Mysql) DeleteVersion(tableName string) string

func (*Mysql) GetMigrationByVersion

func (m *Mysql) GetMigrationByVersion(tableName string) string

func (*Mysql) InsertVersion

func (m *Mysql) InsertVersion(tableName string) string

func (*Mysql) ListMigrations

func (m *Mysql) ListMigrations(tableName string) string

type Postgres

type Postgres struct{}

func (*Postgres) CreateTable

func (p *Postgres) CreateTable(tableName string) string

func (*Postgres) DeleteVersion

func (p *Postgres) DeleteVersion(tableName string) string

func (*Postgres) GetMigrationByVersion

func (p *Postgres) GetMigrationByVersion(tableName string) string

func (*Postgres) InsertVersion

func (p *Postgres) InsertVersion(tableName string) string

func (*Postgres) ListMigrations

func (p *Postgres) ListMigrations(tableName string) string

type Querier

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

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

	// DeleteVersion returns the SQL query string to delete a version from
	// the db version table.
	DeleteVersion(tableName string) 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(tableName string) 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(tableName string) string
}

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

type Redshift

type Redshift struct{}

func (*Redshift) CreateTable

func (r *Redshift) CreateTable(tableName string) string

func (*Redshift) DeleteVersion

func (r *Redshift) DeleteVersion(tableName string) string

func (*Redshift) GetMigrationByVersion

func (r *Redshift) GetMigrationByVersion(tableName string) string

func (*Redshift) InsertVersion

func (r *Redshift) InsertVersion(tableName string) string

func (*Redshift) ListMigrations

func (r *Redshift) ListMigrations(tableName string) string

type SQLAnywhere

type SQLAnywhere struct{}

func (*SQLAnywhere) CreateTable

func (s *SQLAnywhere) CreateTable(tableName string) string

func (*SQLAnywhere) DeleteVersion

func (s *SQLAnywhere) DeleteVersion(tableName string) string

func (*SQLAnywhere) GetMigrationByVersion

func (s *SQLAnywhere) GetMigrationByVersion(tableName string) string

func (*SQLAnywhere) InsertVersion

func (s *SQLAnywhere) InsertVersion(tableName string) string

func (*SQLAnywhere) ListMigrations

func (s *SQLAnywhere) ListMigrations(tableName string) string

type Sqlite3

type Sqlite3 struct{}

func (*Sqlite3) CreateTable

func (s *Sqlite3) CreateTable(tableName string) string

func (*Sqlite3) DeleteVersion

func (s *Sqlite3) DeleteVersion(tableName string) string

func (*Sqlite3) GetMigrationByVersion

func (s *Sqlite3) GetMigrationByVersion(tableName string) string

func (*Sqlite3) InsertVersion

func (s *Sqlite3) InsertVersion(tableName string) string

func (*Sqlite3) ListMigrations

func (s *Sqlite3) ListMigrations(tableName string) string

type Sqlserver

type Sqlserver struct{}

func (*Sqlserver) CreateTable

func (s *Sqlserver) CreateTable(tableName string) string

func (*Sqlserver) DeleteVersion

func (s *Sqlserver) DeleteVersion(tableName string) string

func (*Sqlserver) GetMigrationByVersion

func (s *Sqlserver) GetMigrationByVersion(tableName string) string

func (*Sqlserver) InsertVersion

func (s *Sqlserver) InsertVersion(tableName string) string

func (*Sqlserver) ListMigrations

func (s *Sqlserver) ListMigrations(tableName string) string

type Tidb

type Tidb struct{}

func (*Tidb) CreateTable

func (t *Tidb) CreateTable(tableName string) string

func (*Tidb) DeleteVersion

func (t *Tidb) DeleteVersion(tableName string) string

func (*Tidb) GetMigrationByVersion

func (t *Tidb) GetMigrationByVersion(tableName string) string

func (*Tidb) InsertVersion

func (t *Tidb) InsertVersion(tableName string) string

func (*Tidb) ListMigrations

func (t *Tidb) ListMigrations(tableName string) string

type Vertica

type Vertica struct{}

func (*Vertica) CreateTable

func (v *Vertica) CreateTable(tableName string) string

func (*Vertica) DeleteVersion

func (v *Vertica) DeleteVersion(tableName string) string

func (*Vertica) GetMigrationByVersion

func (v *Vertica) GetMigrationByVersion(tableName string) string

func (*Vertica) InsertVersion

func (v *Vertica) InsertVersion(tableName string) string

func (*Vertica) ListMigrations

func (v *Vertica) ListMigrations(tableName string) string

type Ydb

type Ydb struct{}

func (*Ydb) CreateTable

func (c *Ydb) CreateTable(tableName string) string

func (*Ydb) DeleteVersion

func (c *Ydb) DeleteVersion(tableName string) string

func (*Ydb) GetMigrationByVersion

func (c *Ydb) GetMigrationByVersion(tableName string) string

func (*Ydb) InsertVersion

func (c *Ydb) InsertVersion(tableName string) string

func (*Ydb) ListMigrations

func (c *Ydb) ListMigrations(tableName string) string

Jump to

Keyboard shortcuts

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