Documentation ¶
Index ¶
- Constants
- Variables
- func InitGlobal()
- type SchemaStore
- type SimpleSchemaStore
- func (s *SimpleSchemaStore) Close()
- func (s *SimpleSchemaStore) DeleteTable(db string, table string) error
- func (s *SimpleSchemaStore) GetTable(db string, table string) (ts *core.Table, err error)
- func (s *SimpleSchemaStore) GetType() string
- func (s *SimpleSchemaStore) InitWithClient(client *sql.DB)
- func (s *SimpleSchemaStore) SetLogger(logger *log.Logger)
Constants ¶
View Source
const TableNotFoundError = 1146
Variables ¶
View Source
var ColumnNameTypeMapping map[string]core.ColumnType
Functions ¶
func InitGlobal ¶
func InitGlobal()
Types ¶
type SchemaStore ¶
type SimpleSchemaStore ¶
type SimpleSchemaStore struct {
// contains filtered or unexported fields
}
SimpleSchemaStore always get the newest table schemas from db. DDL event will trigger refreshing.
func NewSimpleSchemaStoreWithClient ¶
func NewSimpleSchemaStoreWithClient(client *sql.DB) *SimpleSchemaStore
func (*SimpleSchemaStore) Close ¶
func (s *SimpleSchemaStore) Close()
func (*SimpleSchemaStore) DeleteTable ¶
func (s *SimpleSchemaStore) DeleteTable(db string, table string) error
DeleteTable remove table schema from cache
func (*SimpleSchemaStore) GetTable ¶
GetTable first tries to return table schema from cache, if not found then query from DB.
func (*SimpleSchemaStore) GetType ¶
func (s *SimpleSchemaStore) GetType() string
func (*SimpleSchemaStore) InitWithClient ¶
func (s *SimpleSchemaStore) InitWithClient(client *sql.DB)
func (*SimpleSchemaStore) SetLogger ¶
func (s *SimpleSchemaStore) SetLogger(logger *log.Logger)
Click to show internal directories.
Click to hide internal directories.