package
19.2.12+incompatible
Repository: https://github.com/cockroachdb/cockroach-gen.git
Documentation: pkg.go.dev

# Functions

ExpandDataSourceGlob is a utility function that expands a tree.TablePattern into a list of object names.
FindTableColumnByName returns the ordinal of the non-mutation column having the given name, if one exists in the given table.
FormatSequence nicely formats a catalog sequence using a treeprinter for debugging and testing.
FormatTable nicely formats a catalog table using a treeprinter for debugging and testing.
FormatView nicely formats a catalog view using a treeprinter for debugging and testing.
FormatZone nicely formats a catalog zone using a treeprinter for debugging and testing.
IsMutationColumn is a convenience function that returns true if the column at the given ordinal position is a mutation column.
IsMutationIndex is a convenience function that returns true if the index at the given ordinal position is a mutation index.
ResolveTableIndex resolves a TableIndexName.

# Constants

PrimaryIndex selects the primary index of a table when calling the Table.Index method.

# Structs

CheckConstraint contains the SQL text and the validity status for a check constraint on a table.
FamilyColumn describes a single column that is part of a family definition.
Flags allows controlling aspects of some Catalog operations.
HistogramBucket contains the data for a single histogram bucket.
IndexColumn describes a single column that is part of an index definition.

# Interfaces

Catalog is an interface to a database catalog, exposing only the information needed by the query optimizer.
Column is an interface to a table column, exposing only the information needed by the query optimizer.
Constraint governs placement of range replicas on nodes.
ConstraintSet is a set of constraints that apply to a range, restricting which nodes can host that range or stating which nodes are preferred as the leaseholder.
DataSource is an interface to a database object that provides rows, like a table, a view, or a sequence.
Family is an interface to a table column family, exposing only the information needed by the query optimizer.
ForeignKeyConstraint represents a foreign key constraint.
Index is an interface to a database index, exposing only the information needed by the query optimizer.
Object is implemented by all objects in the catalog.
ReplicaConstraints is a set of constraints that apply to one or more replicas of a range, restricting which nodes can host that range.
Schema is an interface to a database schema, which is a namespace that contains other database objects, like tables and views.
Sequence is an interface to a database sequence.
Table is an interface to a database table, exposing only the information needed by the query optimizer.
TableStatistic is an interface to a table statistic.
View is an interface to a database view, exposing only the information needed by the query optimizer.
Zone is an interface to zone configuration information used by the optimizer.

# Type aliases

DataSourceName is an alias for tree.TableName, and is used for views and sequences as well as tables.
IndexOrdinal identifies an index (in the context of a Table).
SchemaName is an alias for tree.TableNamePrefix, since it consists of the catalog + schema name.
StableID permanently and uniquely identifies a catalog object (table, view, index, column, etc.) within its scope: data source StableID: unique within database index StableID: unique within table column StableID: unique within table If a new catalog object is created, it will always be assigned a new StableID that has never, and will never, be reused by a different object in the same scope.