Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBInfoAsInfoSchema ¶
DBInfoAsInfoSchema is used mainly in test.
func (DBInfoAsInfoSchema) AllSchemas ¶
func (d DBInfoAsInfoSchema) AllSchemas() []*model.DBInfo
AllSchemas implement infoschema.SchemaAndTable interface.
func (DBInfoAsInfoSchema) SchemaTableInfos ¶
func (d DBInfoAsInfoSchema) SchemaTableInfos(ctx stdctx.Context, schema pmodel.CIStr) ([]*model.TableInfo, error)
SchemaTableInfos implement infoschema.SchemaAndTable interface.
type MetaOnlyInfoSchema ¶
type MetaOnlyInfoSchema interface { SchemaMetaVersion() int64 SchemaByName(schema pmodel.CIStr) (*model.DBInfo, bool) SchemaExists(schema pmodel.CIStr) bool TableInfoByName(schema, table pmodel.CIStr) (*model.TableInfo, error) TableInfoByID(id int64) (*model.TableInfo, bool) FindTableInfoByPartitionID(partitionID int64) (*model.TableInfo, *model.DBInfo, *model.PartitionDefinition) TableExists(schema, table pmodel.CIStr) bool SchemaByID(id int64) (*model.DBInfo, bool) SchemaAndTable AllSchemaNames() []pmodel.CIStr SchemaSimpleTableInfos(ctx stdctx.Context, schema pmodel.CIStr) ([]*model.TableNameInfo, error) Misc }
MetaOnlyInfoSchema is a workaround. Due to circular dependency cannot return the complete interface. But MetaOnlyInfoSchema is widely used for scenes that require meta only, so we give a convenience for that.
type Misc ¶
type Misc interface { PolicyByName(name pmodel.CIStr) (*model.PolicyInfo, bool) ResourceGroupByName(name pmodel.CIStr) (*model.ResourceGroupInfo, bool) // PlacementBundleByPhysicalTableID is used to get a rule bundle. PlacementBundleByPhysicalTableID(id int64) (*placement.Bundle, bool) // AllPlacementBundles is used to get all placement bundles AllPlacementBundles() []*placement.Bundle // AllPlacementPolicies returns all placement policies AllPlacementPolicies() []*model.PolicyInfo // ClonePlacementPolicies returns a copy of all placement policies. ClonePlacementPolicies() map[string]*model.PolicyInfo // AllResourceGroups returns all resource groups AllResourceGroups() []*model.ResourceGroupInfo // CloneResourceGroups returns a copy of all resource groups. CloneResourceGroups() map[string]*model.ResourceGroupInfo // HasTemporaryTable returns whether information schema has temporary table HasTemporaryTable() bool // GetTableReferredForeignKeys gets the table's ReferredFKInfo by lowercase schema and table name. GetTableReferredForeignKeys(schema, table string) []*model.ReferredFKInfo }
Misc contains the methods that are not closely related to InfoSchema.
Click to show internal directories.
Click to hide internal directories.