package
2.2.0-alpha.20190114+incompatible
Repository: https://github.com/ortery/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.
MakeDeleter creates a Deleter for the given table.
MakeInserter creates a Inserter for the given table.
MakeUpdater creates a Updater for the given table.
NewUniquenessConstraintViolationError creates an error that represents a violation of a UNIQUE constraint.
NoCheckPrivilege can be used to not perform any privilege checks during a TablesNeededForFKs function call.
NoLookup can be used to not perform any lookups during a TablesNeededForFKs function call.
SetKVBatchSize changes the kvBatchFetcher batch size, and returns a function that restores it.
TablesNeededForFKs populates a map of TableLookupsByID for all the TableDescriptors that might be needed when performing FK checking for delete and/or insert operations.
# 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).
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
CFetcher handles fetching kvs and forming table rows for an arbitrary number of tables.
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.
SpanKVFetcher is an kvBatchFetcher that returns a set slice of kvs.
TableLookup is the value type of TableLookupsByID: 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.
# Interfaces
FkSpanCollector can collect the spans that foreign key validation will touch.
# Type aliases
CheckPrivilegeFunction is the function type used by TablesNeededForFKs that will check the privileges of the current user to access specific tables.
FKCheck indicates a kind of FK check (delete, insert, or both).
ID is an alias for sqlbase.ID.
TableLookupFunction is the function type used by TablesNeededForFKs that will perform the actual lookup.
TableLookupsByID maps table IDs to looked up descriptors or, for tables that exist but are not yet public/leasable, entries with just the IsAdding flag.