package
19.2.10+incompatible
Repository: https://github.com/haseth/cockroach.git
Documentation: pkg.go.dev
# Functions
AdjustEndKeyForInterleave returns an exclusive end key.
AdjustStartKeyForInterleave adjusts the start key to skip unnecessary interleaved sections.
CannotWriteToComputedColError constructs a write error for a computed column.
CheckDatumTypeFitsColumnType verifies that a given scalar value type is valid to be stored in a column of the given column type.
CheckRenderStar handles the case where the target specification contains a SQL star (UnqualifiedStar or AllColumnsSelector).
ColTypeInfoFromColDescs creates a ColTypeInfo from []ColumnDescriptor.
ColTypeInfoFromColTypes creates a ColTypeInfo from []ColumnType.
ColTypeInfoFromResCols creates a ColTypeInfo from ResultColumns.
ColumnNeedsBackfill returns true if adding the given column requires a backfill (dropping a column always requires a backfill).
ColumnsSelectors generates Select expressions for cols.
CompareDatums compares two datum rows according to a column ordering.
ConditionalGetTableDescFromTxn validates that the supplied TableDescriptor matches the one currently stored in kv.
DatumToEncDatum initializes an EncDatum with the given Datum.
DatumTypeHasCompositeKeyEncoding is a version of HasCompositeKeyEncoding which works on datum types.
DecodeIndexKey decodes the values that are a part of the specified index key (setting vals).
DecodeIndexKeyPrefix decodes the prefix of an index key and returns the index id and a slice for the rest of the key.
DecodeIndexKeyWithoutTableIDIndexIDPrefix is the same as DecodeIndexKey, except it expects its index key is missing its first table id / index id key prefix.
DecodeKeyVals decodes the values that are part of the key.
DecodePartitionTuple parses columns (which are a prefix of the columns of `idxDesc`) encoded with the "value" encoding and returns the parsed datums.
DecodeTableIDIndexID decodes a table id followed by an index id.
DecodeTableKey decodes a value encoded by EncodeTableKey.
DecodeTableValue decodes a value encoded by EncodeTableValue.
EncDatumFromBuffer initializes an EncDatum with an encoding that is possibly followed by other data.
EncDatumFromEncoded initializes an EncDatum with the given encoded value.
EncDatumRowToDatums converts a given EncDatumRow to a Datums.
EncDatumValueFromBufferWithOffsetsAndType is just like calling EncDatumFromBuffer with DatumEncoding_VALUE, except it expects that you pass in the result of calling DecodeValueTag on the input buf.
EncodeColumns is a version of EncodePartialIndexKey that takes ColumnIDs and directions explicitly.
EncodeDatumKeyAscending encodes a datum using an order-preserving encoding.
EncodeDatumsKeyAscending encodes a Datums (tuple) using an order-preserving encoding.
EncodeIndexKey creates a key by concatenating keyPrefix with the encodings of the columns in the index, and returns the key and whether any of the encoded values were NULLs.
EncodeIndexSpan creates the minimal key span for the key specified by the given table, index, and values, with the same method as EncodeIndexKey.
EncodeInvertedIndexKeys creates a list of inverted index keys by concatenating keyPrefix with the encodings of the column in the index.
EncodeInvertedIndexTableKeys encodes the paths in a JSON `val` and concatenates it with `inKey`and returns a list of buffers per path.
EncodePartialIndexKey encodes a partial index key; only the first numCols of index.ColumnIDs are encoded.
EncodePartialIndexSpan creates the minimal key span for the key specified by the given table, index, and values, with the same method as EncodePartialIndexKey.
EncodeSecondaryIndex encodes key/values for a secondary index.
EncodeSecondaryIndexes encodes key/values for the secondary indexes.
EncodeTableIDIndexID encodes a table id followed by an index id.
EncodeTableKey encodes `val` into `b` and returns the new buffer.
EncodeTableValue encodes `val` into `appendTo` using DatumEncoding_VALUE and returns the new buffer.
EncodingDirToDatumEncoding returns an equivalent DatumEncoding for the given encoding direction.
ExtractIndexKey constructs the index (primary) key for a row from any index key/value entry, including secondary indexes.
FillColumnRange creates a single range that refers to all the columns between firstIdx and lastIdx, inclusive.
FindFKOriginIndex finds the first index in the supplied originTable that can satisfy an outgoing foreign key of the supplied column ids.
FindFKReferencedIndex finds the first index in the supplied referencedTable that can satisfy a foreign key of the supplied column ids.
GenEncDatumRowsInt converts rows of ints to rows of EncDatum DInts.
GetColumnTypes returns the types of the columns with the given IDs.
GetDatabaseDescFromID retrieves the database descriptor for the database ID passed in using an existing proto getter.
GetImmutableTableDescriptor retrieves an immutable table descriptor directly from the KV layer.
GetMutableTableDescFromID retrieves the table descriptor for the table ID passed in using an existing proto getter.
GetTableDescFromID retrieves the table descriptor for the table ID passed in using an existing proto getter.
GetTableDescriptor retrieves a table descriptor directly from the KV layer.
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.
IndexKeyEquivSignature parses an index key if and only if the index key belongs to a table where its equivalence signature and all its interleave ancestors' signatures can be found in validEquivSignatures.
IndexKeyValDirs returns the corresponding encoding.Directions for all the encoded values in index's "fullest" possible index key, including directions for table/index IDs, the interleaved sentinel and the index column values.
IntEncDatum returns an EncDatum representation of DInt(i).
IsCCLRequiredError returns whether the error is a CCLRequired error.
IsOutOfMemoryError checks whether this is an out of memory error.
IsReservedID returns whether this ID is for any system object.
IsSystemConfigID returns whether this ID is for a system config object.
IsVirtualTable returns true if the TableDescriptor describes a virtual Table (like the informationgi_schema tables) and thus doesn't need to be physically stored.
JoinTypeFromAstString takes a join string as found in a SQL statement (e.g.
LimitValueWidth checks that the width (for strings, byte arrays, and bit strings) and scale (for decimals) of the value fits the specified column type.
LookupSystemTableDescriptorID uses the lookup cache above to bypass a KV lookup when resolving the name of system tables.
MakeAllDescsMetadataKey returns the key for all descriptors.
MakeColTypeInfo returns a ColTypeInfo initialized from the given TableDescriptor and map from column ID to row index.
MakeColumnDefDescs creates the column descriptor for a column, as well as the index descriptor if the column is a primary key or unique.
MakeComputedExprs returns a slice of the computed expressions for the slice of input column descriptors, or nil if none of the input column descriptors have computed expressions.
MakeDefaultExprs returns a slice of the default expressions for the slice of input column descriptors, or nil if none of the input column descriptors have default expressions.
MakeDescMetadataKey returns the key for the descriptor.
MakeIndexKeyPrefix returns the key prefix used for the index's data.
MakeIntCols makes a slice of numCols IntTypes.
MakeIntRows constructs a numRows x numCols table where rows[i][j] = i + j.
MakeMetadataSchema constructs a new MetadataSchema value which constructs the "system" database.
MakeMultiSourceInfo constructs a MultiSourceInfo for the given DataSourceInfos.
MakeNameMetadataKey returns the key for the name.
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.
MakeRandIntRows constructs a numRows x numCols table where the values are random.
MakeRandIntRowsInRange constructs a numRows * numCols table where the values are random integers in the range [0, maxNum).
MakeRepeatedIntRows constructs a numRows x numCols table where blocks of n consecutive rows have the same value.
MakeSpanFromEncDatums creates a minimal index key span on the input values.
MakeSystemDatabaseDesc constructs a copy of the system database descriptor.
MarshalColumnValue produces the value encoding of the given datum, constrained by the given column type, into a roachpb.Value.
MustBeValueEncoded returns true if columns of the given kind can only be value encoded.
NeededColumnFamilyIDs returns a slice of FamilyIDs which contain the families needed to load a set of neededCols.
NewAggInAggError creates an error for the case when an aggregate function is contained within another aggregate function.
NewCancelChecker returns a new CancelChecker.
NewCCLRequiredError creates an error for when a CCL feature is used in an OSS binary.
NewCustomSuperuserPrivilegeDescriptor returns a privilege descriptor for the root user and the admin role with specified privileges.
NewDatabaseAlreadyExistsError creates an error for a preexisting database.
NewDatabaseKey returns a new DatabaseKey.
NewDefaultPrivilegeDescriptor returns a privilege descriptor with ALL privileges for the root user and admin role.
NewDependentObjectError creates a dependent object error.
NewDependentObjectErrorWithHint creates a dependent object error with a hint.
NewEvalCheckHelper constructs a new instance of the CheckHelper, to be used in the "Eval" mode (see comment for the CheckHelper struct).
NewImmutableTableDescriptor returns a ImmutableTableDescriptor from the given TableDescriptor.
NewInputCheckHelper constructs a new instance of the CheckHelper, to be used in the "Input" mode (see comment for the CheckHelper struct).
NewInvalidSchemaDefinitionError creates an error for an invalid schema definition such as a schema definition that doesn't parse.
NewInvalidWildcardError creates an error that represents the result of expanding a table wildcard over an invalid database or schema prefix.
NewMutableCreatedTableDescriptor returns a MutableTableDescriptor from the given TableDescriptor with the cluster version being the zero table.
NewMutableExistingTableDescriptor returns a MutableTableDescriptor from the given TableDescriptor with the cluster version also set to the descriptor.
NewNonNullViolationError creates an error for a violation of a non-NULL constraint.
NewPrivilegeDescriptor returns a privilege descriptor for the given user with the specified list of privileges.
NewRangeUnavailableError creates an unavailable range error.
NewRelationAlreadyExistsError creates an error for a preexisting relation.
NewSourceInfoForSingleTable creates a simple DataSourceInfo which maps the same tableAlias to all columns.
NewSyntaxError creates a syntax error.
NewTableKey returns a new TableKey.
NewTransactionAbortedError creates an error for trying to run a command in the context of transaction that's already aborted.
NewTransactionCommittedError creates an error that signals that the SQL txn is in the COMMIT_WAIT state and that only a COMMIT statement will be accepted.
NewUndefinedColumnError creates an error that represents a missing database column.
NewUndefinedDatabaseError creates an error that represents a missing database.
NewUndefinedRelationError creates an error that represents a missing database table or view.
NewUnsupportedSchemaUsageError creates an error for an invalid schema use, e.g.
NewWindowInAggError creates an error for the case when a window function is nested within an aggregate function.
NewWrongObjectTypeError creates a wrong object type error.
NullEncDatum returns and EncDatum representation of tree.DNull.
PrettyKey pretty-prints the specified key, skipping over the first `skip` fields.
PrettySpan returns a human-readable representation of a span.
PrettySpans returns a human-readable description of the spans.
ProcessComputedColumns adds columns which are computed to the set of columns being updated and returns the computation exprs for those columns.
ProcessDefaultColumns adds columns with DEFAULT to cols if not present and returns the defaultExprs for cols.
ProcessTargetColumns returns the column descriptors identified by the given name list.
RandArrayContentsType returns a random type that's guaranteed to be valid to use as the contents of an array.
RandCollationLocale returns a random element of collationLocales.
RandColumnType returns a random type that is a legal column type (e.g.
RandColumnTypes returns a slice of numCols random types.
RandCreateTable creates a random CreateTable definition.
RandDatum generates a random Datum of the given type.
RandDatumEncoding returns a random DatumEncoding value.
RandDatumWithNullChance generates a random Datum of the given type.
RandEncDatum generates a random EncDatum (of a random type).
RandEncDatumRowOfTypes generates a slice of random EncDatum values for the corresponding type in types.
RandEncDatumRows generates EncDatumRows where all rows follow the same random []ColumnType structure.
RandEncDatumRowsOfTypes generates EncDatumRows, each row with values of the corresponding type in types.
RandEncodableColumnTypes works around #36736, which fails when name[] (or other type using DTypeWrapper) is encoded.
RandEncodableType wraps RandType in order to workaround #36736, which fails when name[] (or other type using DTypeWrapper) is encoded.
RandScalarType returns a random type value that is not an array or tuple.
RandSortingEncDatumSlice generates a slice of random EncDatum values of the same random type which is key-encodable.
RandSortingEncDatumSlices generates EncDatum slices, each slice with values of the same random type which is key-encodable.
RandSortingType returns a column type which can be key-encoded.
RandSortingTypes returns a slice of numCols random ColumnType values which are key-encodable.
RandType returns a random type value.
RemapIVarsInTypedExpr remaps tree.IndexedVars in expr using indexVarMap.
ResolveNames is a wrapper around ResolveNamesUsingVisitor.
ResolveNamesUsingVisitor resolves the names in the given expression.
ResultColumnsFromColDescs converts ColumnDescriptors to ResultColumns.
RunFilter runs a filter expression and returns whether the filter passes.
SanitizeVarFreeExpr verifies that an expression is valid, has the correct type and contains no variable expressions.
SkipTableKey skips a value of type valType in key, returning the remainder of the key.
Sort sorts data.
SplitAtIDHook determines whether a specific descriptor ID should be considered for a split at all.
SplitSpanIntoSeparateFamilies can only be used to split a span representing a single row point lookup into separate spans that request particular families from neededFamilies instead of requesting all the families.
StrEncDatum returns an EncDatum representation of DString(s).
TableEquivSignatures returns the equivalence signatures for each interleave ancestor and itself.
TestingMakePrimaryIndexKey creates a key prefix that corresponds to a table row (in the primary index); it is intended for tests.
UnmarshalColumnValue is the counterpart to MarshalColumnValues.
ValidateColumnDefType returns an error if the type of a column definition is not valid.
WrapDescriptor fills in a Descriptor.
# Constants
BaseFormatVersion corresponds to the encoding described in https://www.cockroachlabs.com/blog/sql-in-cockroachdb-mapping-table-data-to-key-value-storage/.
comments stores comments(database, table, column...).
No description provided by the author
No description provided by the author
NOT NULL constraints being added are represented by a dummy check constraint so that a multi-state schema change, including a bulk validation step, can occur.
ConstraintTypeCheck identifies a CHECK constraint.
ConstraintTypeFK identifies a FOREIGN KEY constraint.
ConstraintTypePK identifies a PRIMARY KEY constraint.
ConstraintTypeUnique identifies a FOREIGN constraint.
The constraint is being dropped in the schema changer.
The constraint has not yet been validated for all rows (and will not be validated until VALIDATE CONSTRAINT is used).
The constraint is valid for all rows.
The constraint was just added, but the validation for existing rows is not yet complete.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Indicates that the datum is encoded using the order-preserving encoding used for keys (ascending order).
Indicates that the datum is encoded using the order-preserving encoding used for keys (descending order).
Indicates that the datum is encoded using the encoding used for values.
DelegatedAppNamePrefix is added to a regular client application name for SQL queries that are ran internally on behalf of other SQL queries inside that application.
Descriptor is being added.
Operations can use this invisible descriptor to implicitly write and delete entries.
Operations can use this invisible descriptor to implicitly delete entries.
Descriptor is being dropped.
Not used.
Not used.
These system tables are part of the system config.
EncDatumOverhead is the overhead of EncDatum in bytes.
EncDatumRowOverhead is the overhead of EncDatumRow in bytes.
These system tables are not part of the system config.
Prettier aliases for JoinType values.
FamilyFormatVersion corresponds to the encoding described in https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20151214_sql_column_families.md.
FamilyHeuristicTargetBytes is the target total byte size of columns that the current heuristic will assign to a family.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Prettier aliases for JoinType values.
IgnoreConstraints is used in MakeFirstMutationPublic to indicate that the table descriptor returned should not include newly added constraints, which is useful when passing the returned table descriptor to be used in validating constraints to be added.
IncludeConstraints is used in MakeFirstMutationPublic to indicate that the table descriptor returned should include newly added constraints.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Prettier aliases for JoinType values.
InterleavedFormatVersion corresponds to the encoding described in https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20160624_sql_interleaved_tables.md.
InternalAppNamePrefix indicates that the application name identifies an internal task / query / job to CockroachDB.
Prettier aliases for JoinType values.
InvalidID is the uninitialised descriptor id.
InvalidMutationID is the uninitialised mutation id.
Note: this schema is changed in a migration (a progress column is added in a separate family).
EXCEPT_ALL is a special join-like operation that is only used for EXCEPT ALL and EXCEPT operations.
No description provided by the author
No description provided by the author
INTERSECT_ALL is a special join-like operation that is only used for INTERSECT ALL and INTERSECT operations.
A left anti join is an "inverted" semi join: it returns the rows from the left side that don't match any columns on the right side (as per equality columns and ON condition).
No description provided by the author
A left semi join returns the rows from the left side that match at least one row from the right side (as per equality columns and ON condition).
No description provided by the author
These system tables are not part of the system config.
Prettier aliases for JoinType values.
Prettier aliases for JoinType values.
Prettier aliases for JoinType values.
locations are used to map a locality specified by a node to geographic latitude, longitude coordinates, specified as degrees.
Oid for virtual database and table.
These system tables are part of the system config.
PartitionDefaultVal represents the special DEFAULT value.
PartitionMaxVal represents the special MAXVALUE value.
PartitionMinVal represents the special MINVALUE value.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
Oid for virtual database and table.
PrimaryKeyIndexName is the name of the index for the primary key.
rangelog is currently envisioned as a wide table; many different event types can be recorded to the table.
ReportableAppNamePrefix indicates that the application name can be reported in telemetry without scrubbing.
Prettier aliases for JoinType values.
role_members stores relationships between roles (role->role and role->user).
These system tables are part of the system config.
Descriptor is being added.
No description provided by the author
Descriptor is being dropped.
Descriptor is offline (e.g.
Not used.
No description provided by the author
table_statistics is used to track statistics collected about individual columns or groups of columns from every table in the database.
These system tables are not part of the system config.
These system tables are part of the system config.
web_sessions are used to track authenticated user actions over stateless connections, such as the cookie-based authentication used by the Admin UI.
Zone settings per DB/Table.
# Variables
AdminRole is the default (and non-droppable) role with superuser privileges.
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 .
AnonymousTable is the empty table name, used when a data source has no own name, e.g.
CommentsTable is the descriptor for the comments table.
CompositeKeyMatchMethodValue allows the conversion from a tree.ReferenceCompositeKeyMatchMethod to a ForeignKeyReference_Match.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultSearchPath is the search path used by virgin sessions.
DefaultSuperuserPrivileges is the list of privileges for super users on non-system objects.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DescriptorTable is the descriptor for the descriptor table.
ErrDescriptorNotFound is returned by GetTableDescFromID to signal that a descriptor could not be found with the given id.
ErrIndexGCMutationsList is returned by FindIndexByID to signal that the index with the given ID does not have a descriptor and is in the garbage collected mutations list.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrMissingColumns indicates a table with no columns.
ErrMissingPrimaryKey indicates a table with no primary key.
EventLogTable is the descriptor for the event log table.
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.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ForeignKeyReferenceActionType allows the conversion between a tree.ReferenceAction and a ForeignKeyReference_Action.
ForeignKeyReferenceActionValue allows the conversion between a ForeignKeyReference_Action and a tree.ReferenceAction.
ForeignKeyReferenceMatchValue allows the conversion from a ForeignKeyReference_Match to a tree.ReferenceCompositeKeyMatchMethod.
FourIntCols is a slice of four IntTypes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
JobsTable is the descriptor for the jobs table.
No description provided by the author
No description provided by the author
LeaseTable is the descriptor for the leases table.
LocationsTable is the descriptor for the locations table.
NamespaceTable is the descriptor for the namespace table.
NoOrdering is used to indicate an empty ColumnOrdering.
OneIntCol is a slice of one IntType.
ParallelScans controls parallelizing multi-range scans when the maximum size of the result set is known.
PublicRole is the special "public" pseudo-role.
QueryCanceledError is an error representing query cancellation.
QueryTimeoutError is an error representing a query timeout.
RangeEventTable is the descriptor for the range log table.
TODO(andrei): In 20.1 we should add a foreign key reference to the reports_meta table.
These system TableDescriptor literals should match the descriptor that would be produced by evaluating one of the above `CREATE TABLE` statements for system tables that are not system config tables.
TODO(andrei): In 20.1 we should add a foreign key reference to the reports_meta table.
TODO(andrei): In 20.1 we should add a foreign key reference to the reports_meta table.
These system TableDescriptor literals should match the descriptor that would be produced by evaluating one of the above `CREATE TABLE` statements for system tables that are not system config tables.
These system TableDescriptor literals should match the descriptor that would be produced by evaluating one of the above `CREATE TABLE` statements for system tables that are not system config tables.
RoleMembersTable is the descriptor for the role_members table.
ScrubColumns are the result columns of a SCRUB statement.
SequenceSelectColumns are the result columns of a sequence data source.
SettingsTable is the descriptor for the jobs table.
ShowCompactTraceColumns are the result columns of a SHOW COMPACT [KV] TRACE statement.
ShowFingerprintsColumns are the result columns of a SHOW EXPERIMENTAL_FINGERPRINTS 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.
SystemAllowedPrivileges describes the allowable privilege list for each system object.
SystemDB is the descriptor for the system database.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TableStatistics table to hold statistics about columns and column groups.
ThreeIntCols is a slice of three IntTypes.
TwoIntCols is a slice of two IntTypes.
UITable is the descriptor for the ui table.
UsersTable is the descriptor for the users table.
WebSessions table to authenticate sessions over stateless connections.
ZonesTable is the descriptor for the zones table.
# Structs
CancelChecker is a helper object for repeatedly checking whether the associated context has been canceled or not.
CheckHelper validates check constraints on rows, on INSERT and UPDATE.
ColTypeInfo is a type that allows multiple representations of column type information (to avoid conversions and allocations).
No description provided by the author
ColumnFamilyDescriptor is set of columns stored together in one kv entry.
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.
ConstraintDetail describes a constraint.
ConstraintToUpdate represents a constraint to be added to the table and validated for existing rows.
DatabaseDescriptor represents a namespace (aka database) and is stored in a structured metadata key.
DatabaseKey implements DescriptorKey.
DataSourceInfo provides column metadata for exactly one data source.
DatumAlloc provides batch allocation of datum pointers, amortizing the cost of the allocations.
Descriptor is a union type holding either a table or database descriptor.
No description provided by the author
No description provided by the author
A DescriptorMutation represents a column or an index that has either been added or dropped and hasn't yet transitioned into a stable state: completely backfilled and visible, or completely deleted.
No description provided by the author
No description provided by the author
No description provided by the author
DummyEvalPlanner implements the tree.EvalPlanner interface by returning errors.
DummySequenceOperators implements the tree.SequenceOperators interface by returning errors.
DummySessionAccessor implements the tree.EvalSessionAccessor interface by returning errors.
EncDatum represents a datum that is "backed" by an encoding and/or by a tree.Datum.
EncDatumRowAlloc is a helper that speeds up allocation of EncDatumRows (preferably of the same length).
EncDatumRowContainer holds rows and can cycle through them.
ForeignKeyConstraint is the new (as of 19.2 and VersionTopLevelForeignKeys) representation for foreign keys.
No description provided by the author
ImmutableTableDescriptor is a custom type for TableDescriptors It holds precomputed values and the underlying TableDescriptor should be const.
IndexDescriptor describes an index (primary or secondary).
IndexEntry represents an encoded key/value for an index entry.
InterleaveDescriptor represents an index (either primary or secondary) that is interleaved into another table's data.
No description provided by the author
MapProtoGetter is a protoGetter that has a hard-coded map of keys to proto messages.
MetadataSchema is used to construct the initial sql schema for a new CockroachDB cluster being bootstrapped.
MutableTableDescriptor is a custom type for TableDescriptors going through schema mutations.
NameResolutionVisitor is a tree.Visitor implementation used to resolve the column names in an expression.
PartitioningDescriptor represents the partitioning of an index into spans of keys addressable by a zone config.
List represents a list partitioning, which maps individual tuples to partitions.
Range represents a range partitioning, which maps ranges of tuples to partitions by specifying exclusive upper bounds.
PartitionTuple represents a tuple in a partitioning specification.
PrepareMetadata encapsulates information about a statement that is gathered during Prepare and is later used during Describe or Execute.
PrivilegeDescriptor describes a list of users and attached privileges.
ResultColumn contains the name and type of a SQL "cell".
RowIndexedVarContainer is used to evaluate expressions over various rows.
SourceAlias associates a table name (alias) to a set of columns in the result row of a data source.
A TableDescriptor represents a table or view and is stored in a structured metadata key.
No description provided by the author
No description provided by the author
No description provided by the author
A table descriptor is named through a name map stored in the system.namespace table: a map from {parent_id, table_name} -> id.
No description provided by the author
No description provided by the author
The schema update lease.
No description provided by the author
TableKey implements DescriptorKey interface.
UserPrivileges describes the list of privileges available for a given user.
UserPrivilegeString is a pair of strings describing the privileges for a given user.
# Interfaces
DescriptorKey is the interface implemented by both databaseKey and tableKey.
DescriptorProto is the interface implemented by both DatabaseDescriptor and TableDescriptor.
# Type aliases
AnalyzeExprFunction is the function type used by the CheckHelper during initialization to analyze an expression.
ColumnID is a custom type for ColumnDescriptor IDs.
ColumnIDs is a slice of ColumnDescriptor IDs.
ColumnOrdering is used to describe a desired column ordering.
No description provided by the author
ConstraintType is used to identify the type of a constraint.
No description provided by the author
DatumEncoding identifies the encoding used for an EncDatum.
Direction of mutation.
A descriptor within a mutation is unavailable for reads, writes and deletes.
DescriptorVersion is a custom type for TableDescriptor Versions.
EncDatumRow is a row of EncDatums.
EncDatumRows is a slice of EncDatumRows having the same schema.
FamilyID is a custom type for ColumnFamilyDescriptor IDs.
No description provided by the author
Match is the algorithm used to compare composite keys.
FormatVersion is a custom type for TableDescriptor versions of the sql to key:value mapping.go:generate stringer -type=FormatVersion.
ID is a custom type for {Database,Table}Descriptor IDs.
IDs is a sortable list of IDs.
The direction of a column in the index.
The type of the index.
IndexID is a custom type for IndexDescriptor IDs.
JoinType is the particular type of a join (or join-like) operation.
MultiSourceInfo is a list of *DataSourceInfo.
MutationID is a custom type for TableDescriptor mutations.
PartitionSpecialValCode identifies a special value.
ResultColumns is the type used throughout the sql module to describe the column types of a table.
SourceAliases is an array of one or more SourceAlias.
AuditMode indicates which auditing actions to take when this table is used.
State is set if this TableDescriptor is in the process of being added or deleted.
TableDescriptors is a sortable list of *TableDescriptors.
TablesByID is a shorthand for the common map of tables keyed by ID.