Documentation ¶
Index ¶
- type Clickhouse
- func (c *Clickhouse) CreateTable(tableName string) string
- func (c *Clickhouse) DeleteVersion(tableName string) string
- func (c *Clickhouse) GetMigrationByVersion(tableName string) string
- func (c *Clickhouse) InsertVersion(tableName string) string
- func (c *Clickhouse) ListMigrations(tableName string) string
- type Memsql
- type Mysql
- type Postgres
- type Querier
- type Redshift
- type Sqlite3
- type Sqlserver
- func (s *Sqlserver) CreateTable(tableName string) string
- func (s *Sqlserver) DeleteVersion(tableName string) string
- func (s *Sqlserver) GetMigrationByVersion(tableName string) string
- func (s *Sqlserver) InsertVersion(tableName string) string
- func (s *Sqlserver) ListMigrations(tableName string) string
- type Tidb
- type Turso
- type Vertica
- type Ydb
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 Memsql ¶
type Memsql struct{}
func (*Memsql) CreateTable ¶
func (*Memsql) DeleteVersion ¶
func (*Memsql) GetMigrationByVersion ¶
func (*Memsql) InsertVersion ¶
func (*Memsql) ListMigrations ¶
type Mysql ¶
type Mysql struct{}
func (*Mysql) CreateTable ¶
func (*Mysql) DeleteVersion ¶
func (*Mysql) GetMigrationByVersion ¶
func (*Mysql) InsertVersion ¶
func (*Mysql) ListMigrations ¶
type Postgres ¶
type Postgres struct{}
func (*Postgres) CreateTable ¶
func (*Postgres) DeleteVersion ¶
func (*Postgres) GetMigrationByVersion ¶
func (*Postgres) InsertVersion ¶
func (*Postgres) ListMigrations ¶
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 (*Redshift) DeleteVersion ¶
func (*Redshift) GetMigrationByVersion ¶
func (*Redshift) InsertVersion ¶
func (*Redshift) ListMigrations ¶
type Sqlite3 ¶
type Sqlite3 struct{}
func (*Sqlite3) CreateTable ¶
func (*Sqlite3) DeleteVersion ¶
func (*Sqlite3) GetMigrationByVersion ¶
func (*Sqlite3) InsertVersion ¶
func (*Sqlite3) ListMigrations ¶
type Sqlserver ¶
type Sqlserver struct{}
func (*Sqlserver) CreateTable ¶
func (*Sqlserver) DeleteVersion ¶
func (*Sqlserver) GetMigrationByVersion ¶
func (*Sqlserver) InsertVersion ¶
func (*Sqlserver) ListMigrations ¶
type Tidb ¶
type Tidb struct{}
func (*Tidb) CreateTable ¶
func (*Tidb) DeleteVersion ¶
func (*Tidb) GetMigrationByVersion ¶
func (*Tidb) InsertVersion ¶
func (*Tidb) ListMigrations ¶
type Vertica ¶
type Vertica struct{}
func (*Vertica) CreateTable ¶
func (*Vertica) DeleteVersion ¶
func (*Vertica) GetMigrationByVersion ¶
func (*Vertica) InsertVersion ¶
func (*Vertica) ListMigrations ¶
type Ydb ¶
type Ydb struct{}
func (*Ydb) CreateTable ¶
func (*Ydb) DeleteVersion ¶
func (*Ydb) GetMigrationByVersion ¶
func (*Ydb) InsertVersion ¶
func (*Ydb) ListMigrations ¶
Click to show internal directories.
Click to hide internal directories.