package
19.2.12+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 ColumnDescriptor.
ConvertBatchError returns a user friendly constraint violation error.
GenerateInsertRow prepares a row tuple for insertion.
MakeDeleter creates a Deleter for the given table.
MakeFkMetadata populates a map of FkTableMetadata for all the TableDescriptors that might be needed when performing FK checking for delete and/or insert operations.
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.
NewUniquenessConstraintViolationError creates an error that represents a violation of a UNIQUE constraint.
NoCheckPrivilege is a stub that can be used to not actually verify privileges.
NoLookup is a stub that can be used to not actually fetch metadata.
SetKVBatchSize changes the kvBatchFetcher batch size, and returns a function that restores it.
# Constants
CheckDeletes checks if rows reference a changed value.
CheckFKs can be passed to row writers to check fk validity.
CheckInserts checks if a new value references an existing row.
CheckUpdates checks all references (CheckDeletes+CheckInserts).
DebugRowFetch can be used to turn on some low-level debugging logs.
SkipFKs can be passed to row writer to skip fk validity checks.
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.
# 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.
SpanKVFetcher is a kvBatchFetcher that returns a set slice of kvs.
TableEntry is the value type of FkTableMetadata: An optional table descriptor, populated when the table is public/leasable, and an IsAdding flag.
Updater abstracts the key/value operations for updating table rows.
# Type aliases
CheckPrivilegeFunction is the function type used by MakeFkMetadata that will check the privileges of the current user to access specific tables.
FKCheckType indicates the type of mutation that triggers FK work (delete, insert, or both).
FkTableMetadata maps table IDs to looked up descriptors or, for tables that exist but are not yet public/leasable, entries with just the IsAdding flag.
KVInserter implements the putter interface.
TableID is an alias for sqlbase.TableID (table IDs).
TableLookupFunction is the function type used by MakeFkMetadata that will perform the actual lookup of table metadata.