Versions in this module Expand all Collapse all v1 v1.0.9 Apr 20, 2018 Changes in this version + const Name + var ErrCannotAddForeign = terror.ClassSchema.New(codeCannotAddForeign, "Cannot add foreign key constraint") + var ErrColumnExists = terror.ClassSchema.New(codeColumnExists, "Duplicate column name '%s'") + var ErrColumnNotExists = terror.ClassSchema.New(codeColumnNotExists, "Unknown column '%s' in '%s'") + var ErrDatabaseDropExists = terror.ClassSchema.New(codeDBDropExists, "Can't drop database '%s'; database doesn't exist") + var ErrDatabaseExists = terror.ClassSchema.New(codeDatabaseExists, "Can't create database '%s'; database exists") + var ErrDatabaseNotExists = terror.ClassSchema.New(codeDatabaseNotExists, "Unknown database '%s'") + var ErrForeignKeyNotExists = terror.ClassSchema.New(codeForeignKeyNotExists, "Can't DROP '%s'; check that column/key exists") + var ErrForeignKeyNotMatch = terror.ClassSchema.New(codeWrongFkDef, ...) + var ErrIndexExists = terror.ClassSchema.New(codeIndexExists, "Duplicate Index") + var ErrMultiplePriKey = terror.ClassSchema.New(codeMultiplePriKey, "Multiple primary key defined") + var ErrTableDropExists = terror.ClassSchema.New(codeBadTable, "Unknown table '%s'") + var ErrTableExists = terror.ClassSchema.New(codeTableExists, "Table '%s' already exists") + var ErrTableNotExists = terror.ClassSchema.New(codeTableNotExists, "Table '%s.%s' doesn't exist") + var ErrTooManyKeyParts = terror.ClassSchema.New(codeTooManyKeyParts, "Too many key parts specified; max %d parts allowed") + func IsMemoryDB(dbName string) bool + type Builder struct + func NewBuilder(handle *Handle) *Builder + func (b *Builder) ApplyDiff(m *meta.Meta, diff *model.SchemaDiff) ([]int64, error) + func (b *Builder) Build() + func (b *Builder) InitWithDBInfos(dbInfos []*model.DBInfo, schemaVersion int64) (*Builder, error) + func (b *Builder) InitWithOldInfoSchema() *Builder + type Handle struct + func NewHandle(store kv.Storage) *Handle + func (h *Handle) EmptyClone() *Handle + func (h *Handle) Get() InfoSchema + type InfoSchema interface + AllSchemaNames func() []string + AllSchemas func() []*model.DBInfo + AllocByID func(id int64) (autoid.Allocator, bool) + Clone func() (result []*model.DBInfo) + SchemaByID func(id int64) (*model.DBInfo, bool) + SchemaByName func(schema model.CIStr) (*model.DBInfo, bool) + SchemaExists func(schema model.CIStr) bool + SchemaMetaVersion func() int64 + SchemaTables func(schema model.CIStr) []table.Table + TableByID func(id int64) (table.Table, bool) + TableByName func(schema, table model.CIStr) (table.Table, error) + TableExists func(schema, table model.CIStr) bool + func MockInfoSchema(tbList []*model.TableInfo) InfoSchema