sync

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 5 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sync

func Sync(c *Config, mc *EmailConfig, dbOperators ...internal.DBOperator) (sta *internal.Statics, err error)

Types

type Config

type Config struct {
	Sync        bool
	Drop        bool
	SourceDSN   string
	DestDSN     string
	AlterIgnore string
	Tables      string
	SkipTables  string
	MailTo      string
}

type EmailConfig

type EmailConfig struct {
	On       bool
	SMTPHost string
	From     string
	Password string
	To       string
}

type MySchemaData

type MySchemaData struct {
	Data string
	// contains filtered or unexported fields
}

MySchemaData db schema data

func NewMySchemaData

func NewMySchemaData(schema string, dbType string) *MySchemaData

NewMySchemaData object

func (*MySchemaData) Begin

func (m *MySchemaData) Begin() (*sql.Tx, error)

func (*MySchemaData) Close

func (m *MySchemaData) Close() error

func (*MySchemaData) GetTableNames

func (m *MySchemaData) GetTableNames() []string

GetTableNames table names

func (*MySchemaData) GetTableSchema

func (m *MySchemaData) GetTableSchema(name string) (schema string)

GetTableSchema table schema

func (*MySchemaData) Query

func (m *MySchemaData) Query(query string, args ...interface{}) (*sql.Rows, error)

Query execute sql query

Jump to

Keyboard shortcuts

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