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

# Functions

BuildIndexName returns an index name that is not equal to any of tableDesc's indexes, roughly following Postgres's conventions for naming anonymous indexes.
CheckLogicalReplicationCompatibility verifies that the destination table descriptor is a valid target for logical replication and is equivalent to the source table.
ColumnNamePlaceholder constructs a placeholder name for a column based on its id.
ColumnsSelectors generates Select expressions for cols.
ConstraintNamePlaceholder constructs a placeholder name for a constraint based on its id.
EvalShardBucketCount evaluates and checks the integer argument to a `USING HASH WITH BUCKET_COUNT` index creation query.
ForEachExprStringInTableDesc runs a closure for each expression string within a TableDescriptor.
ForeignKeyConstraintName forms a default foreign key constraint name.
GenerateUniqueName attempts to generate a unique name with the given prefix.
GetShardColumnName generates a name for the hidden shard column to be used to create a hash sharded index.
IndexNamePlaceholder constructs a placeholder name for an index based on its id.
InitTableDescriptor returns a blank TableDescriptor.
LocalityConfigGlobal returns a config for a GLOBAL table.
LocalityConfigRegionalByRow returns a config for a REGIONAL BY ROW table.
LocalityConfigRegionalByTable returns a config for a REGIONAL BY TABLE table.
MakeColumnDefDescs creates the column descriptor for a column, as well as the index descriptor if the column is a primary key or unique.
MakeNotNullCheckConstraint creates a dummy check constraint equivalent to a NOT NULL constraint on a column, so that NOT NULL constraints can be added and dropped correctly in the schema changer.
NewBuilder returns a new TableDescriptorBuilder instance by delegating to NewBuilderWithMVCCTimestamp with an empty MVCC timestamp.
NewBuilderForFKUpgrade should be used when attempting to upgrade the foreign key representation of a table descriptor.
NewBuilderWithMVCCTimestamp creates a new TableDescriptorBuilder instance for building table descriptors.
NewInvalidInvertedColumnError returns an error for a column that's not inverted indexable.
NewPartitioning creates a new catalog.paritioning from the given partitioning descriptor.
NewUnsafeImmutable should be used as sparingly as possible only in cases where deep-copying the descpb.TableDescriptor struct is bad for performance and is known to not be necessary for safety.
PolicyNamePlaceholder constructs a placeholder name for a policy based on its id.
PrimaryKeyIndexName returns an appropriate PrimaryKey index name for the given table.
PrimaryKeyString returns the pretty-printed primary key declaration for a table descriptor.
RenameColumnInTable will rename the column in tableDesc from oldName to newName, including in expressions as well as shard columns.
UpdateIndexPartitioning applies the new partition and adjusts the column info for the specified index descriptor.
ValidateNotVisibleIndex returns a notice when dropping the given index may behave differently than marking the index invisible.
ValidateOnUpdate returns an error if there is a column with both a foreign key constraint and an ON UPDATE expression, nil otherwise.
ValidateRowLevelTTL validates that the TTL options are valid.
ValidateTTLBatchSize validates the batch size of a TTL.
ValidateTTLCronExpr validates the cron expression of TTL.
ValidateTTLExpirationColumn validates that the ttl_expire_after setting, if any, is in a valid state.
ValidateTTLExpirationExpr validates that the ttl_expiration_expression, if any, only references existing columns.
ValidateTTLRateLimit validates the rate limit parameters of TTL.
ValidateTTLRowStatsPollInterval validates the automatic statistics field of TTL.

# Constants

DefaultExpr means the expression is a DEFAULT expression.
FamilyHeuristicTargetBytes is the target total byte size of columns that the current heuristic will assign to a family.
FamilyPrimaryName is the name of the "primary" family, which is autogenerated the family clause is not specified.
LegacyPrimaryKeyIndexName is the pre 22.1 default PRIMARY KEY index name.
MaxBucketAllowed is the maximum number of buckets allowed when creating a hash-sharded index or primary key.
OfflineReasonImporting hard codes the Offline Reason for Importing Tables.
OnUpdateExpr means the expression is a ON UPDATE expression.
SequenceColumnID is the ID of the sole column in a sequence.
SequenceColumnName is the name of the sole column in a sequence.

# Variables

DefaultHashShardedIndexBucketCount is the cluster setting of default bucket count for hash sharded index when bucket count is not specified in index definition.
ErrMissingColumns indicates a table with no columns.
ErrMissingPrimaryKey indicates a table with no primary key.

# Structs

ColumnDefDescs contains the non-error return values for MakeColumnDefDescs.
Mutable is a custom type for TableDescriptors going through schema mutations.

# Interfaces

TableDescriptorBuilder is an extension of catalog.DescriptorBuilder for table descriptors.

# Type aliases

ColExprKind is an enum type of possible expressions on a column (e.g.