package
20.2.19+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
ColIDtoRowIndexFromCols groups a slice of ColumnDescriptors by their ID field, returning a map from ID to the index of the column in the input slice.
ColMapping returns a map from ordinals in the fromCols list to ordinals in the toCols list.
ConvertBatchError returns a user friendly constraint violation error.
ConvertFetchError attempts to a map key-value error generated during a key-value fetch to a user friendly SQL error.
DecodeRowInfo takes a table descriptor, a key, and an optional value and returns information about the corresponding SQL row.
FKCheckSpan returns a span that can be scanned to ascertain existence of a specific row in a given index.
GenerateInsertRow prepares a row tuple for insertion.
MakeDeleter creates a Deleter for the given table.
MakeInserter creates a Inserter for the given table.
MakeUpdater creates a Updater for the given table.
NewDatumRowConverter returns an instance of a DatumRowConverter.
NewKVFetcher creates a new KVFetcher.
NewLockNotAvailableError creates an error that represents an inability to acquire a lock.
NewUniquenessConstraintViolationError creates an error that represents a violation of a UNIQUE constraint.
TestingSetDatumRowConverterBatchSize sets kvDatumRowConverterBatchSize and returns function to reset this setting back to its old value.
TestingSetKVBatchSize changes the kvBatchFetcher batch size, and returns a function that restores it.
# Constants
DebugRowFetch can be used to turn on some low-level debugging logs.
MVCCDecodingNotRequired is used when timestamps aren't needed.
MVCCDecodingRequired is used when timestamps are needed.
TableTruncateChunkSize is the maximum number of keys deleted per chunk during a table or index truncation.
UpdaterDefault indicates that an Updater should update everything about a row, including secondary indexes.
UpdaterOnlyColumns indicates that an Updater should only update the columns of a row and not the secondary indexes.
# Structs
DatumRowConverter converts Datums into kvs and streams it to the destination channel.
Deleter abstracts the key/value operations for deleting table rows.
Fetcher handles fetching kvs and forming table rows for an arbitrary number of tables.
FetcherTableArgs are the arguments passed to Fetcher.Init for a given table that includes descriptors and row information.
Inserter abstracts the key/value operations for inserting table rows.
KVBatch represents a batch of KVs generated from converted rows.
KVFetcher wraps kvBatchFetcher, providing a NextKV interface that returns the next kv from its input.
PartialIndexUpdateHelper keeps track of partial indexes that should be not be updated during a mutation.
SpanKVFetcher is a kvBatchFetcher that returns a set slice of kvs.
Updater abstracts the key/value operations for updating table rows.
# Interfaces
KeyToDescTranslator is capable of translating a key found in an error to a table descriptor for error reporting.
# Type aliases
KVInserter implements the putter interface.
MVCCDecodingStrategy controls if and how the fetcher should decode MVCC timestamps from returned KV's.