information_schema

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 23

Documentation

Index

Constants

View Source
const (
	// AdministrableRoleAuthorizationsTableName is the name of the ADMINISTRABLE_ROLE_AUTHORIZATIONS table.
	AdministrableRoleAuthorizationsTableName = "administrable_role_authorizations"
	// ApplicableRolesTableName is the name of the APPLICABLE_ROLES table.
	ApplicableRolesTableName = "applicable_roles"
	// CharacterSetsTableName is the name of the CHARACTER_SETS table
	CharacterSetsTableName = "character_sets"
	// CheckConstraintsTableName is the name of CHECK_CONSTRAINTS table
	CheckConstraintsTableName = "check_constraints"
	// CollationCharSetApplicabilityTableName is the name of COLLATION_CHARACTER_SET_APPLICABILITY table.
	CollationCharSetApplicabilityTableName = "collation_character_set_applicability"
	// CollationsTableName is the name of the COLLATIONS table.
	CollationsTableName = "collations"
	// ColumnPrivilegesTableName is the name of the COLUMN_PRIVILEGES table.
	ColumnPrivilegesTableName = "column_privileges"
	// ColumnStatisticsTableName is the name of the COLUMN_STATISTICS table.
	ColumnStatisticsTableName = "column_statistics"
	// ColumnsTableName is the name of the COLUMNS table.
	ColumnsTableName = "columns"
	// ColumnsExtensionsTableName is the name of the COLUMN_EXTENSIONS table.
	ColumnsExtensionsTableName = "columns_extensions"
	// EnabledRolesTablesName is the name of the ENABLED_ROLES table.
	EnabledRolesTablesName = "enabled_roles"
	// EnginesTableName is the name of the ENGINES table
	EnginesTableName = "engines"
	// EventsTableName is the name of the EVENTS table.
	EventsTableName = "events"
	// FilesTableName is the name of the FILES table.
	FilesTableName = "files"
	// KeyColumnUsageTableName is the name of the KEY_COLUMN_USAGE table.
	KeyColumnUsageTableName = "key_column_usage"
	// KeywordsTableName is the name of the KEYWORDS table.
	KeywordsTableName = "keywords"
	// OptimizerTraceTableName is the name of the OPTIMIZER_TRACE table.
	OptimizerTraceTableName = "optimizer_trace"
	// ParametersTableName is the name of the PARAMETERS table.
	ParametersTableName = "parameters"
	// PartitionsTableName is the name of the PARTITIONS table
	PartitionsTableName = "partitions"
	// PluginsTableName is the name of the PLUGINS table.
	PluginsTableName = "plugins"
	// ProcessListTableName is the name of the PROCESSLIST table
	ProcessListTableName = "processlist"
	// ProfilingTableName is the name of the PROFILING table.
	ProfilingTableName = "profiling"
	// ReferentialConstraintsTableName is the name of the TABLE_CONSTRAINTS table.
	ReferentialConstraintsTableName = "referential_constraints"
	// ResourceGroupsTableName is the name of the RESOURCE_GROUPS table.
	ResourceGroupsTableName = "resource_groups"
	// RoleColumnGrantsTableName is the name of the ROLE_COLUMNS_GRANTS table.
	RoleColumnGrantsTableName = "role_column_grants"
	// RoleRoutineGrantsTableName is the name of the ROLE_ROUTINE_GRANTS table.
	RoleRoutineGrantsTableName = "role_routine_grants"
	// RoleTableGrantsTableName is the name of the ROLE_TABLE_GRANTS table.
	RoleTableGrantsTableName = "role_table_grants"
	// RoutinesTableName is the name of the ROUTINES table.
	RoutinesTableName = "routines"
	// SchemaPrivilegesTableName is the name of the SCHEMA_PRIVILEGES table.
	SchemaPrivilegesTableName = "schema_privileges"
	// SchemataTableName is the name of the SCHEMATA table.
	SchemataTableName = "schemata"
	// SchemataExtensionsTableName is the name of the SCHEMATA_EXTENSIONS table.
	SchemataExtensionsTableName = "schemata_extensions"
	// StGeometryColumnsTableName is the name of the ST_GEOMETRY_COLUMNS table.
	StGeometryColumnsTableName = "st_geometry_columns"
	// StSpatialReferenceSystemsTableName is the name of the ST_SPATIAL_REFERENCE_SYSTEMS table.
	StSpatialReferenceSystemsTableName = "st_spatial_reference_systems"
	// StUnitsOfMeasureTableName is the name of the ST_UNITS_OF_MEASURE
	StUnitsOfMeasureTableName = "st_units_of_measure"
	// StatisticsTableName is the name of the STATISTICS table.
	StatisticsTableName = "statistics"
	// TableConstraintsTableName is the name of the TABLE_CONSTRAINTS table.
	TableConstraintsTableName = "table_constraints"
	// TableConstraintsExtensionsTableName is the name of the TABLE_CONSTRAINTS_EXTENSIONS table.
	TableConstraintsExtensionsTableName = "table_constraints_extensions"
	// TablePrivilegesTableName is the name of the TABLE_PRIVILEGES table.
	TablePrivilegesTableName = "table_privileges"
	// TablesTableName is the name of the TABLES table.
	TablesTableName = "tables"
	// TablesExtensionsTableName is the name of TABLE_EXTENSIONS table.
	TablesExtensionsTableName = "tables_extensions"
	// TablespacesTableName is the names of the TABLESPACES table.
	TablespacesTableName = "tablespaces"
	// TablespacesExtensionsTableName is the name of the TABLESPACES_EXTENSIONS table.
	TablespacesExtensionsTableName = "tablespaces_extensions"
	// TriggersTableName is the name of the TRIGGERS table.
	TriggersTableName = "triggers"
	// UserAttributesTableName is the name of the USER_ATTRIBUTES table.
	UserAttributesTableName = "user_attributes"
	// UserPrivilegesTableName is the name of the USER_PRIVILEGES table
	UserPrivilegesTableName = "user_privileges"
	// ViewRoutineUsageTableName is the name of VIEW_ROUTINE_USAGE table.
	ViewRoutineUsageTableName = "view_routine_usage"
	// ViewTableUsageTableName is the name of the VIEW_TABLE_USAGE table.
	ViewTableUsageTableName = "view_table_usage"
	// ViewsTableName is the name of the VIEWS table.
	ViewsTableName = "views"
)
View Source
const (
	// InnoDBBufferPageName is the name of the INNODB_BUFFER_PAGE Table
	InnoDBBufferPageName = "innodb_buffer_page"
	// InnoDBBufferPageLRUName is the name of the INNODB_BUFFER_PAGE_LRU Table
	InnoDBBufferPageLRUName = "innodb_buffer_page_lru"
	// InnoDBBufferPoolStatsName is the name of the INNODB_BUFFER_POOL_STATS Table
	InnoDBBufferPoolStatsName = "innodb_buffer_pool_stats"
	// InnoDBCachedIndexesName is the name of the INNODB_CACHED_INDEXES Table
	InnoDBCachedIndexesName = "innodb_cached_indexes"
	// InnoDBCmpName is the name of the INNODB_CMP and INNODB_CMP_RESET Tables
	InnoDBCmpName      = "innodb_cmp"
	InnoDBCmpResetName = "innodb_cmp_reset"
	// InnoDBCmpmemName is the name of the INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables
	InnoDBCmpmemName      = "innodb_cmpmem"
	InnoDBCmpmemResetName = "innodb_cmpmem_reset"
	// InnoDBCmpPerIndexName is the name of the INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Table
	InnoDBCmpPerIndexName      = "innodb_cmp_per_index"
	InnoDBCmpPerIndexResetName = "innodb_cmp_per_index_reset"
	// InnoDBColumnsName is the name of the INNODB_COLUMNS Table
	InnoDBColumnsName = "innodb_columns"
	// InnoDBDatafilesName is the name of the INNODB_DATAFILES Table
	InnoDBDatafilesName = "innodb_datafiles"
	// InnoDBFieldsName is the name of the INNODB_FIELDS Table
	InnoDBFieldsName = "innodb_fields"
	// InnoDBForeignName is the name of the INNODB_FOREIGN Table
	InnoDBForeignName = "innodb_foreign"
	// InnoDBForeignColsName is the name of the INNODB_FOREIGN_COLS Table
	InnoDBForeignColsName = "innodb_foreign_cols"
	// InnoDBFtBeingDeletedName is the name of the INNODB_FT_BEING_DELETED Table
	InnoDBFtBeingDeletedName = "innodb_ft_being_deleted"
	// InnoDBFtConfigName is the name of the INNODB_FT_CONFIG Table
	InnoDBFtConfigName = "innodb_ft_config"
	// InnoDBFtDefaultStopwordName is the name of the INNODB_FT_DEFAULT_STOPWORD Table
	InnoDBFtDefaultStopwordName = "innodb_ft_default_stopword"
	// InnoDBFtDeletedName is the name of the INNODB_FT_DELETED Table
	InnoDBFtDeletedName = "innodb_ft_deleted"
	// InnoDBFtIndexCacheName is the name of the INNODB_FT_INDEX_CACHE Table
	InnoDBFtIndexCacheName = "innodb_ft_index_cache"
	// InnoDBFtIndexTableName is the name of the INNODB_FT_INDEX_TABLE Table
	InnoDBFtIndexTableName = "innodb_ft_index_table"
	// InnoDBIndexesName is the name of the INNODB_INDEXES Table
	InnoDBIndexesName = "innodb_indexes"
	// InnoDBMetricsName is the name of the INNODB_METRICS Table
	InnoDBMetricsName = "innodb_metrics"
	// InnoDBSessionTempTablespacesName is the name of the INNODB_SESSION_TEMP_TABLESPACES Table
	InnoDBSessionTempTablespacesName = "innodb_session_temp_tablespaces"
	// InnoDBTablesName is the name of the INNODB_TABLES Table
	InnoDBTablesName = "innodb_tables"
	// InnoDBTablespacesName is the name of the INNODB_TABLESPACES Table
	InnoDBTablespacesName = "innodb_tablespaces"
	// InnoDBTablespacesBriefName is the name of the INNODB_TABLESPACES_BRIEF Table
	InnoDBTablespacesBriefName = "innodb_tablespaces_brief"
	// InnoDBTablestatsName is the name of the INNODB_TABLESTATS View
	InnoDBTablestatsName = "innodb_tablestats"
	// InnoDBTempTableInfoName is the name of the INNODB_TEMP_TABLE_INFO table
	InnoDBTempTableInfoName = "innodb_temp_table_info"
	// InnoDBTrxName is the name of the INNODB_TRX Table
	InnoDBTrxName = "innodb_trx"
	// InnoDBVirtualName is the name of the INNODB_VIRTUAL Table
	InnoDBVirtualName = "innodb_virtual"
)

Variables

View Source
var AllDatabasesWithNames = allDatabasesWithNames

AllDatabasesWithNames is used by Doltgres to get the catalog and schema names for the current database. In Dolt, this gets the names for all databases.

View Source
var NewColumnsTable = newMySQLColumnsTable

NewColumnsTable is used by Doltgres to inject its correct schema and row iter. In Dolt, this just returns the current columns table implementation.

View Source
var NewSchemataTable = newMySQLSchemataTable

NewSchemataTable is used by Doltgres to inject its correct schema and row iter. In Dolt, this just returns the current schemata table implementation.

View Source
var NewTablesTable = newMySQLTablesTable

NewTablesTable is used by Doltgres to inject its correct schema and row iter. In Dolt, this just returns the current tables table implementation.

View Source
var NewViewsTable = newMySQLViewsTable

NewViewsTable is used by Doltgres to inject its correct schema and row iter. In Dolt, this just returns the current views table implementation.

Functions

func GetColumnDefault added in v0.19.0

func GetColumnDefault(ctx *sql.Context, cd *sql.ColumnDefaultValue) interface{}

GetColumnDefault returns the column default value for given sql.ColumnDefaultValue

func GetInformationSchemaTables added in v0.19.0

func GetInformationSchemaTables() map[string]Table

func NewDefaultStats added in v0.15.0

func NewDefaultStats() *defaultStatsTable

func NewInformationSchemaDatabase

func NewInformationSchemaDatabase() Database

NewInformationSchemaDatabase creates a new INFORMATION_SCHEMA Database.

func SchemaForTable added in v0.19.0

func SchemaForTable(t sql.Table, db sql.Database, allColsWithDefaultValue sql.Schema) sql.Schema

func ViewsInDatabase added in v0.19.0

func ViewsInDatabase(ctx *Context, db Database) ([]ViewDefinition, error)

ViewsInDatabase returns all views defined on the database given, consulting both the database itself as well as any views defined in session memory. Typically there will not be both types of views on a single database, but the interfaces do make it possible.

Types

type ColumnsTable added in v0.12.0

type ColumnsTable struct {
	TableName   string
	TableSchema sql.Schema

	RowIter func(*sql.Context, sql.Catalog, sql.Schema) (sql.RowIter, error)
	// contains filtered or unexported fields
}

ColumnsTable describes the information_schema.columns table. It implements both sql.Node and sql.Table as way to handle resolving column defaults.

func (*ColumnsTable) AllColumns added in v0.14.0

func (c *ColumnsTable) AllColumns(ctx *sql.Context) (sql.Schema, error)

AllColumns returns all columns in the catalog, renamed to reflect their database and table names

func (*ColumnsTable) AssignCatalog added in v0.14.0

func (c *ColumnsTable) AssignCatalog(cat sql.Catalog) sql.Table

func (*ColumnsTable) Collation added in v0.14.0

func (c *ColumnsTable) Collation() sql.CollationID

Collation implements the sql.Table interface.

func (*ColumnsTable) DataLength added in v0.18.0

func (c *ColumnsTable) DataLength(_ *sql.Context) (uint64, error)

func (*ColumnsTable) Database added in v0.18.0

func (c *ColumnsTable) Database() string

Database implements the sql.Databaseable interface.

func (*ColumnsTable) HasDynamicColumns added in v0.17.0

func (c *ColumnsTable) HasDynamicColumns() bool

func (*ColumnsTable) Name added in v0.12.0

func (c *ColumnsTable) Name() string

Name implements the sql.Table interface.

func (*ColumnsTable) PartitionRows added in v0.12.0

func (c *ColumnsTable) PartitionRows(context *sql.Context, partition sql.Partition) (sql.RowIter, error)

PartitionRows implements the sql.Table interface.

func (*ColumnsTable) Partitions added in v0.12.0

func (c *ColumnsTable) Partitions(context *sql.Context) (sql.PartitionIter, error)

Partitions implements the sql.Table interface.

func (*ColumnsTable) RowCount added in v0.18.0

func (c *ColumnsTable) RowCount(ctx *sql.Context) (uint64, bool, error)

func (*ColumnsTable) Schema added in v0.12.0

func (c *ColumnsTable) Schema() sql.Schema

Schema implements the sql.Table interface.

func (*ColumnsTable) String added in v0.12.0

func (c *ColumnsTable) String() string

String implements the sql.Table interface.

func (ColumnsTable) WithColumnDefaults added in v0.14.0

func (c ColumnsTable) WithColumnDefaults(columnDefaults []sql.Expression) (sql.Table, error)

func (ColumnsTable) WithDefaultsSchema added in v0.17.0

func (c ColumnsTable) WithDefaultsSchema(sch sql.Schema) (sql.Table, error)

type DbWithNames added in v0.19.0

type DbWithNames struct {
	Database    Database
	CatalogName string
	SchemaName  string
}

DbWithNames includes the Database with the catalog and schema names.

type InformationSchemaTable added in v0.19.0

type InformationSchemaTable struct {
	TableName   string
	TableSchema Schema

	Reader func(*Context, Catalog) (RowIter, error)
	// contains filtered or unexported fields
}

func (*InformationSchemaTable) AssignCatalog added in v0.19.0

func (t *InformationSchemaTable) AssignCatalog(cat Catalog) Table

func (*InformationSchemaTable) Collation added in v0.19.0

func (t *InformationSchemaTable) Collation() CollationID

Collation implements the sql.Table interface.

func (*InformationSchemaTable) DataLength added in v0.19.0

func (t *InformationSchemaTable) DataLength(_ *Context) (uint64, error)

func (*InformationSchemaTable) Database added in v0.19.0

func (c *InformationSchemaTable) Database() string

Database implements the sql.Databaseable interface.

func (*InformationSchemaTable) Name added in v0.19.0

func (t *InformationSchemaTable) Name() string

Name implements the sql.Table interface.

func (*InformationSchemaTable) PartitionRows added in v0.19.0

func (t *InformationSchemaTable) PartitionRows(ctx *Context, partition Partition) (RowIter, error)

PartitionRows implements the sql.PartitionRows interface.

func (*InformationSchemaTable) Partitions added in v0.19.0

func (t *InformationSchemaTable) Partitions(ctx *Context) (PartitionIter, error)

Partitions implements the sql.Table interface.

func (*InformationSchemaTable) RowCount added in v0.19.0

func (t *InformationSchemaTable) RowCount(ctx *Context) (uint64, bool, error)

func (*InformationSchemaTable) Schema added in v0.19.0

func (t *InformationSchemaTable) Schema() Schema

Schema implements the sql.Table interface.

func (*InformationSchemaTable) String added in v0.19.0

func (t *InformationSchemaTable) String() string

PartitionCount implements the sql.PartitionCounter interface.

type Keyword added in v0.15.0

type Keyword struct {
	Word     string
	Reserved int32
}

type UnitOfMeasure added in v0.15.0

type UnitOfMeasure struct {
	Name             string
	Type             string
	ConversionFactor float64
	Description      string
}

Jump to

Keyboard shortcuts

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