package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
DatumToEncDatum initializes an EncDatum with the given Datum.
DatumToEncDatumEx is the same as DatumToEncDatum that returns an error instead of panicking under unexpected circumstances.
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.
DecodeIndexKeyToDatums decodes a key to tree.Datums.
DecodeKeyVals decodes the values that are part of the key.
DecodeKeyValsUsingSpec is a variant of DecodeKeyVals which uses fetchpb.IndexFetchSpec_KeyColumn for column metadata.
DecodePartialTableIDIndexID decodes a table id followed by an index id.
DecodePartitionTuple parses columns (which are a prefix of the columns of `idxDesc`) encoded with the "value" encoding and returns the parsed datums.
DecodeWrapper decodes the bytes field of value into an instance of rowencpb.IndexValueWrapper.
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 catenumpb.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 KeyColumnIDs and directions explicitly.
EncodeContainedInvertedIndexSpans returns the spans that must be scanned in the inverted index to evaluate a contained by (<@) predicate with the given datum, which should be a container (either an Array or JSON).
EncodeContainingInvertedIndexSpans returns the spans that must be scanned in the inverted index to evaluate a contains (@>) predicate with the given datum, which should be a container (either JSON or Array).
EncodeExistsInvertedIndexSpans returns the spans that must be scanned in the inverted index to evaluate an exists (?) predicate with the given string datum.
EncodeGeoInvertedIndexTableKeys is the equivalent of EncodeInvertedIndexTableKeys for Geography and Geometry.
EncodeIndexKey creates a key by concatenating keyPrefix with the encodings of the index key columns, and returns the key and whether any of the encoded values were NULLs.
EncodeInvertedIndexKeys creates a list of inverted index keys by concatenating keyPrefix with the encodings of the column in the index.
EncodeInvertedIndexPrefixKeys encodes the non-inverted prefix columns if the given index is a multi-column inverted index.
EncodeInvertedIndexTableKeys produces one inverted index key per element in the input datum, which should be a container (either JSON or Array).
EncodeOverlapsInvertedIndexSpans returns the spans that must be scanned in the inverted index to evaluate an overlaps (&&) predicate with the given datum, which should be an Array.
EncodePartialIndexKey encodes a partial index key; only the given key (or key suffix) columns are encoded; these can be a prefix of the index key columns.
EncodePartialIndexSpan creates the minimal key span for the key specified by the given table, index, and values, with the same method as EncodePartialIndexKey.
EncodePrimaryIndex constructs the key prefix for the primary index and delegates the rest of the encoding to EncodePrimaryIndexWithKeyPrefix.
EncodePrimaryIndexWithKeyPrefix constructs a list of k/v pairs for a row encoded as a primary index, using the provided key prefix specific to that index.
EncodeSecondaryIndex constructs the key prefix for the secondary index and delegates the rest of the encoding to EncodeSecondaryIndexWithKeyPrefix.
EncodeSecondaryIndexes encodes key/values for the secondary indexes.
EncodeSecondaryIndexKey constructs the key prefix for the secondary index and delegates the rest of the encoding to EncodeSecondaryIndexWithKeyPrefix.
EncodeSecondaryIndexKeyWithKeyPrefix generates a slice of byte arrays representing encoded key values for the given secondary index, using the provided key prefix specific to that index.
EncodeSecondaryIndexWithKeyPrefix generates a slice of IndexEntry objects representing encoded key/value pairs for the given secondary index, using the provided key prefix specific to that index.
EncodeTrigramSpans returns the spans that must be scanned to look up trigrams present in the input string.
EncodingDirToDatumEncoding returns an equivalent catenumpb.DatumEncoding for the given encoding direction.
GetValueColumns returns the stored and composite columns that need to be encoded into value.
InitIndexFetchSpec fills in an IndexFetchSpec for the given index and provided fetch columns.
MakeFamilyToColumnMap creates a map that caches the slice of columns encoded into the value for a particular family.
MakeIndexKeyPrefix returns the key prefix used for the index's data.
MakeKeyFromEncDatums creates an index key by concatenating keyPrefix with the encodings of the given EncDatum values.
MakeNullPKError generates an error when the value for a primary key column is null.
MakeSpanFromEncDatums creates a minimal index key span on the input values.
NeededColumnFamilyIDs returns the minimal set of column families required to retrieve neededCols for the specified table and index.
NullEncDatum initializes an EncDatum with the NULL value.
ParseDatumStringAs parses s as type t.
SkipColumnNotInPrimaryIndexValue returns true if the value at column colID does not need to be encoded, either because it is already part of the primary key, or because it is not part of the primary index altogether.
SplitRowKeyIntoFamilySpans splits a key representing a single row point lookup into separate disjoint spans that request only the particular column families from neededFamilies instead of requesting all the families.
# Constants
EncDatumOverhead is the overhead of EncDatum in bytes.
EncDatumRowOverhead is the overhead of EncDatumRow in bytes.
PartitionDefaultVal represents the special DEFAULT value.
PartitionMaxVal represents the special MAXVALUE value.
PartitionMinVal represents the special MINVALUE value.
# Structs
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.
IndexEntry represents an encoded key/value for an index entry.
PartitionTuple represents a tuple in a partitioning specification.
ValueEncodedColumn represents a composite or stored column of a secondary index.
# Type aliases
ByID implements sort.Interface for []valueEncodedColumn based on the id field.
EncDatumRow is a row of EncDatums.
EncDatumRows is a slice of EncDatumRows having the same schema.
PartitionSpecialValCode identifies a special value.