Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeSQLVersion ¶
func ComposeSQLVersion() string
Types ¶
type SQLDump ¶
type SQLDump struct {
// contains filtered or unexported fields
}
func NewSQLDump ¶
func NewSQLDump() *SQLDump
func (*SQLDump) Apply ¶
func (this *SQLDump) Apply(db *dbs.DB, newResult *SQLDumpResult, showLog bool) (ops []string, err error)
Apply 应用数据
func (*SQLDump) SetLogWriter ¶ added in v0.5.8
type SQLDumpResult ¶
type SQLDumpResult struct {
Tables []*SQLTable `json:"tables"`
}
func (*SQLDumpResult) FindTable ¶
func (this *SQLDumpResult) FindTable(tableName string) *SQLTable
type SQLExecutor ¶
type SQLExecutor struct {
// contains filtered or unexported fields
}
SQLExecutor 安装或升级SQL执行器
func NewSQLExecutor ¶
func NewSQLExecutor(dbConfig *dbs.DBConfig) *SQLExecutor
func NewSQLExecutorFromCmd ¶
func NewSQLExecutorFromCmd() (*SQLExecutor, error)
func (*SQLExecutor) Run ¶
func (this *SQLExecutor) Run(showLog bool) error
func (*SQLExecutor) SetLogWriter ¶ added in v0.5.8
func (this *SQLExecutor) SetLogWriter(logWriter io.Writer)
type SQLField ¶
func (*SQLField) EqualDefinition ¶
type SQLRecord ¶
type SQLRecordsTable ¶
type SQLTable ¶
type SQLTable struct { Name string `json:"name"` Engine string `json:"engine"` Charset string `json:"charset"` Definition string `json:"definition"` Fields []*SQLField `json:"fields"` Indexes []*SQLIndex `json:"indexes"` Records []*SQLRecord `json:"records"` }
func (*SQLTable) FindRecord ¶
Click to show internal directories.
Click to hide internal directories.