domain

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DDL

type DDL interface {
	Table() string
	SQL() *SQL
	Diff(ddl *DDL) (string, error)
}

func NewDDL

func NewDDL(tableName, sql string) DDL

type Migration

type Migration interface {
	Version() uint
	Diff(migration *Migration) (map[string]string, error)
	// EffectTables() ([]string, error)
	// SetDDL(tableName string, ddl DDL)
	GetDDLs() map[string]*DDL
}

func NewMigration

func NewMigration(cmd MigrationCommand) (Migration, error)

type MigrationCommand

type MigrationCommand struct {
	Version uint
	SQL     *SQL
	DDLs    map[string]*DDL // key: tableName
}

type SQL

type SQL interface {
	EffectTables() ([]string, error)
	String() string
}

func NewSQL

func NewSQL(s string) SQL

Jump to

Keyboard shortcuts

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