Documentation ¶
Index ¶
- func FormatSchema(schema string) string
- func ParseIndexDDL(schemas string) []string
- func ParseSchema(schema string) *internal.MySchema
- type Compare
- type MyDb
- type SchemaData
- func (m *SchemaData) Begin() (*sql.Tx, error)
- func (m *SchemaData) Close() error
- func (m *SchemaData) DBEngine() string
- func (m *SchemaData) Exec(query string) (sql.Result, error)
- func (m *SchemaData) GetTableNames() ([]string, error)
- func (m *SchemaData) GetTableSchema(name string) (schema string, err error)
- func (m *SchemaData) Query(query string, args ...interface{}) (*sql.Rows, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSchema ¶
func ParseIndexDDL ¶ added in v0.2.4
func ParseSchema ¶
ParseSchema parse table's schema
Types ¶
type Compare ¶
type Compare struct { }
func NewCompare ¶
func NewCompare() *Compare
func (*Compare) AlterData ¶
func (c *Compare) AlterData(sc *internal.SchemaSync, table string) (*internal.TableAlterData, error)
type MyDb ¶
MyDb db struct
func (*MyDb) GetTableNames ¶
GetTableNames table names
func (*MyDb) GetTableSchema ¶
GetTableSchema table schema
type SchemaData ¶
type SchemaData struct { Data string // contains filtered or unexported fields }
SchemaData db schema data
func NewSchemaData ¶
func NewSchemaData(schema string, dbType string) *SchemaData
NewSchemaData object
func (*SchemaData) Close ¶
func (m *SchemaData) Close() error
func (*SchemaData) DBEngine ¶
func (m *SchemaData) DBEngine() string
func (*SchemaData) Exec ¶
func (m *SchemaData) Exec(query string) (sql.Result, error)
Exec execute sql query
func (*SchemaData) GetTableNames ¶
func (m *SchemaData) GetTableNames() ([]string, error)
GetTableNames table names
func (*SchemaData) GetTableSchema ¶
func (m *SchemaData) GetTableSchema(name string) (schema string, err error)
GetTableSchema table schema
Click to show internal directories.
Click to hide internal directories.