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

# Functions

AdjustValueToColumnType checks that the width (for strings, byte arrays, and bit strings), precision (time), shape/srid (for geospatial types) and scale (for decimals) of the value fits the specified column type.
CheckDatumTypeFitsColumnType verifies that a given scalar value type is valid to be stored in a column of the given column type.
ColTypeInfoFromColDescs creates a ColTypeInfo from []ColumnDescriptor.
ColTypeInfoFromColTypes creates a ColTypeInfo from []ColumnType.
ColTypeInfoFromResCols creates a ColTypeInfo from ResultColumns.
ColumnTypeIsIndexable returns whether the type t is valid as an indexed column.
ColumnTypeIsInvertedIndexable returns whether the type t is valid to be indexed using an inverted index.
CompareDatums compares two datum rows according to a column ordering.
GetColumnTypes returns the types of the columns with the given IDs.
GetSystemColumnDescriptorFromID returns a column descriptor corresponding to the system column referred to by the input column ID.
GetSystemColumnKindFromColumnID returns the kind of system column that colID refers to.
GetTraceAgeColumnIdx retrieves the index of the age column depending on whether the compact format is used.
HasCompositeKeyEncoding returns true if key columns of the given kind can have a composite encoding.
IsColIDSystemColumn returns whether a column ID refers to a system column.
IsSystemColumnName returns whether or not a name is a reserved system column name.
MustBeValueEncoded returns true if columns of the given kind can only be value encoded.
NewSourceInfoForSingleTable creates a simple DataSourceInfo which maps the same tableAlias to all columns.
NewUndefinedColumnError creates an error that represents a missing database column.
ProcessTargetColumns returns the column descriptors identified by the given name list.
ResultColumnsFromColDescPtrs converts []*descpb.ColumnDescriptor to []ResultColumn.
ResultColumnsFromColDescs converts []descpb.ColumnDescriptor to []ResultColumn.
ValidateColumnDefType returns an error if the type of a column definition is not valid.

# Constants

MVCCTimestampColumnID is the ColumnID of the MVCC timesatmp column.
MVCCTimestampColumnName is the name of the MVCC timestamp system column.
TableOIDColumnID is the ID of the tableoid system column.

# Variables

AllSystemColumnDescs contains all registered system columns.
AlterTableRelocateColumns are the result columns of an ALTER TABLE/INDEX .
AlterTableScatterColumns are the result columns of an ALTER TABLE/INDEX .
AlterTableSplitColumns are the result columns of an ALTER TABLE/INDEX .
AlterTableUnsplitColumns are the result columns of an ALTER TABLE/INDEX .
ExplainAnalyzeDebugColumns are the result columns of an EXPLAIN ANALYZE (DEBUG) statement.
ExplainDistSQLColumns are the result columns of an EXPLAIN (DISTSQL) statement.
ExplainOptColumns are the result columns of an EXPLAIN (OPT) statement.
ExplainPlanColumns are the result columns of an EXPLAIN (PLAN) ..
ExplainPlanVerboseColumns are the result columns of an EXPLAIN (PLAN, ...) ..
ExplainVecColumns are the result columns of an EXPLAIN (VEC) statement.
ExportColumns are the result columns of an EXPORT statement.
MVCCTimestampColumnDesc is a column descriptor for the MVCC system column.
MVCCTimestampColumnType is the type of the MVCC timestamp system column.
NoOrdering is used to indicate an empty ColumnOrdering.
ScrubColumns are the result columns of a SCRUB statement.
SequenceSelectColumns are the result columns of a sequence data source.
ShowCompactTraceColumns are the result columns of a SHOW COMPACT [KV] TRACE statement.
ShowFingerprintsColumns are the result columns of a SHOW EXPERIMENTAL_FINGERPRINTS statement.
ShowLastQueryStatisticsColumns are the columns of a SHOW LAST QUERY STATISTICS statement.
ShowReplicaTraceColumns are the result columns of a SHOW EXPERIMENTAL_REPLICA TRACE statement.
ShowSyntaxColumns are the columns of a SHOW SYNTAX statement.
ShowTraceColumns are the result columns of a SHOW [KV] TRACE statement.
TableOIDColumnDesc is a column descriptor for the tableoid column.

# Structs

ColTypeInfo is a type that allows multiple representations of column type information (to avoid conversions and allocations).
ColumnOrderInfo describes a column (as an index) and a desired order direction.
ColumnResolver is a utility struct to be used when resolving column names to point to one of the data sources and one of the column IDs in that data source.
DataSourceInfo provides column metadata for exactly one data source.
ResultColumn contains the name and type of a SQL "cell".

# Type aliases

ColumnOrdering is used to describe a desired column ordering.
ResultColumns is the type used throughout the sql module to describe the column types of a table.