package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
CheckFailed returns error message when a check constraint is violated.
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 attempts to map a key-value error generated during a key-value batch operating over the specified table to a user friendly SQL error.
ConvertFetchError attempts to map a 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.
FKUniqCheckSpan 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.
GetKeyLockingDurability returns the configured lock durability to use for key-value scans.
GetKeyLockingStrength returns the configured per-key locking strength to use for key-value scans.
GetWaitPolicy returns the configured lock wait policy to use for key-value scans.
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.
NewDirectKVBatchFetcher creates a new KVBatchFetcher that uses the COL_BATCH_RESPONSE scan format for Scans (or ReverseScans, if reverse is true).
NewKVFetcher creates a new KVFetcher.
NewStreamingKVFetcher returns a new KVFetcher that utilizes the provided kvstreamer.Streamer to perform KV reads.
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.
# Constants
DebugRowFetch can be used to turn on some low-level debugging logs.
TableTruncateChunkSize is the maximum number of keys deleted per chunk during a table or index truncation.
TraceKVVerbosity is the verbosity level at which pretty printed KVs are logged.
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.
# Variables
TestingInconsistentScanSleep introduces a sleep inside the fetcher after every KV batch (for inconsistent scans, currently used only for table statistics collection).
# Structs
CellInfoAnnotation encapsulates the AST annotation for the various supported default expressions for import.
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 a single table.
FetcherInitArgs contains arguments for Fetcher.Init.
Inserter abstracts the key/value operations for inserting table rows.
KVBatch represents a batch of KVs generated from converted rows.
KVBatchAdapter implements Putter interface and adapts it to kv.Batch API.
KVBatchFetcherResponse contains a response from the KVBatchFetcher.
KVFetcher wraps KVBatchFetcher, providing a NextKV interface that returns the next kv from its input.
KVProvider is a KVBatchFetcher that returns a set slice of kvs.
OriginTimetampCPutHelper is used by callers of Inserter, Updater, and Deleter when the caller wants updates to the primary key to be constructed using ConditionalPutRequests with the OriginTimestamp option set.
PartialIndexUpdateHelper keeps track of partial indexes that should be not be updated during a mutation.
RowHelper has the common methods for table row manipulations.
SeqChunkProvider uses the import job progress to read and write its sequence value chunks.
SequenceMetadata contains information used when processing columns with default expressions which use sequences.
TracePutter logs all requests, ie implements kv trace.
Updater abstracts the key/value operations for updating table rows.
# Interfaces
KVBatchFetcher abstracts the logic of fetching KVs in batches.
Putter is an interface for layering functionality on the path from SQL encoding logic to kv.Batch.
# Type aliases
KVInserter implements the row.Putter interface.