package
19.1.0-beta.20190304+incompatible
Repository: https://github.com/darinpp/cockroach.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package opt contains the Cockroach SQL optimizer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AddPlanHook adds a hook used to short-circuit creating a planNode from a tree.Statement.
AddWrappedPlanHook adds a hook used to short-circuit creating a planNode from a tree.Statement.
AnonymizeStatementsForReporting transforms an action, SQL statements, and a value (usually a recovered panic) into an error that will be useful when passed to our error reporting as it exposes a scrubbed version of the statements.
BytesToClusterWideID converts raw bytes into a ClusterWideID.
CheckPrivilegeForUser verifies that `user`` has `privilege` on `descriptor`.
CompleteZoneConfig takes a zone config pointer and fills in the missing fields by following the chain of inheritance.
CountLeases returns the number of unexpired leases for a number of tables each at a particular version at a particular time.
CreatePartitioning constructs the partitioning descriptor for an index that is partitioned into ranges, each addressable by zone configs.
CreateTestTableDescriptor converts a SQL string to a table for test purposes.
DistIngest is used by IMPORT to run a DistSQL flow to ingest data by starting reader processes on many nodes that each read and ingest their assigned files and then send back a summary of what they ingested.
GenerateClusterWideID takes a timestamp and node ID, and generates a ClusterWideID.
GenerateInsertRow prepares a row tuple for insertion.
GenerateUniqueDescID returns the next available Descriptor ID and increments the counter.
GetAllDescriptors looks up and returns all available descriptors.
GetKeysForTableDescriptor retrieves the KV keys corresponding to the zone, name and descriptor of a table.
GetObjectNames retrieves the names of all objects in the target database/schema.
GetUserHashedPassword returns the hashedPassword for the given username if found in system.users.
GetZoneConfigInTxn looks up the zone and subzone for the specified object ID, index, and partition.
HashForReporting 1-way hashes values for use in stat reporting.
InitTableDescriptor returns a blank TableDescriptor.
IsSessionVariableConfigurable returns true iff there is a session variable with the given name and it is settable by a client (e.g.
LoadCSV performs a distributed transformation of the CSV files at from and stores them in enterprise backup format at to.
MakeCheckConstraint makes a descriptor representation of a check from a def.
MakeDistSQLReceiver creates a DistSQLReceiver.
MakeEventLogger constructs a new EventLogger.
MakeIndexDescriptor creates an index descriptor from a CreateIndex node.
MakeInternalExecutor creates an InternalExecutor.
MakeMemMetrics instantiates the metric objects for an SQL endpoint.
MakeParallelizeQueue creates a new empty ParallelizeQueue that uses the provided DependencyAnalyzer to determine plan dependencies.
MakeSequenceKeyVal returns the key and value of a sequence being set with newVal.
MakeSequenceTableDesc creates a sequence descriptor.
MakeSessionBoundInternalExecutor creates a SessionBoundInternalExecutor.
MakeStmtBufReader creates a StmtBufReader.
MakeTableDesc creates a table descriptor from a CreateTable statement.
MakeViewTableDesc returns the table descriptor for a new view.
MustGetDatabaseDescByID looks up the database descriptor given its ID, returning an error if the descriptor is not found.
NewDistSQLPlanner initializes a DistSQLPlanner.
NewIDVersionPrev returns an initialized IDVersion with the previous version of the descriptor.
NewInternalPlanner is an exported version of newInternalPlanner.
NewLeaseManager creates a new LeaseManager.
NewRowResultWriter creates a new RowResultWriter.
NewSchemaChangeManager returns a new SchemaChangeManager.
NewSchemaChangerForTesting only for tests.
NewServer creates a new Server.
NewSessionRegistry creates a new SessionRegistry with an empty set of sessions.
NewSpanBasedDependencyAnalyzer creates a new SpanBasedDependencyAnalyzer.
NewStmtBuf creates a StmtBuf.
NewVirtualSchemaHolder creates a new VirtualSchemaHolder.
NewZeroNode is the exported version of newZeroNode.
NormalizeAndValidateUsername case folds the specified username and verifies it validates according to the usernameRE regular expression.
NormalizeAndValidateUsernameNoBlacklist case folds the specified username and verifies it validates according to the usernameRE regular expression.
ParseHLC parses a string representation of an `hlc.Timestamp`.
PlanAndRunExport makes and runs an EXPORT plan for the given input and output planNode and spec respectively.
ResolveExistingObject looks up an existing object.
ResolveFK looks up the tables and columns mentioned in a `REFERENCES` constraint and adds metadata representing that constraint to the descriptor.
ResolveMutableExistingObject looks up an existing mutable object.
ResolveTargetObject determines a valid target path for an object that may not exist yet.
ScanMetaKVs returns the meta KVs for the ranges that touch the given span.
ShowCreatePartitioning returns a PARTITION BY clause for the specified index, if applicable.
ShowCreateSequence returns a valid SQL representation of the CREATE SEQUENCE statement used to create the given sequence.
ShowCreateTable returns a valid SQL representation of the CREATE TABLE statement used to create the given table.
ShowCreateView returns a valid SQL representation of the CREATE VIEW statement used to create the given view.
SimplifySerialInColumnDefWithRowID analyzes a column definition and simplifies any use of SERIAL as if SerialNormalizationMode was set to SerialUsesRowID.
StringToClusterWideID converts a string to a ClusterWideID.
TestDisableTableLeases disables table leases and returns a function that can be used to enable it.
ZoneConfigHook returns the zone config for the object with id using the cached system config.

# Constants

Constants for the String() representation of the session states.
Constants for the String() representation of the session states.
DelegatedAppNamePrefix is added to a regular client application name for SQL queries that are ran internally on behalf of other SQL queries inside that application.
DontNeedRowDesc specifies that a row description message is not needed.
EmptyTable represents an existing table that is empty.
EventLogAlterIndex is recorded when an index is altered.
EventLogAlterSequence is recorded when a sequence is altered.
EventLogAlterTable is recorded when a table is altered.
EventLogCommentOnColumn is recorded when a column is commented.
EventLogCommentOnTable is recorded when a table is commented.
EventLogCommentOnTable is recorded when a table is commented.
EventLogCreateDatabase is recorded when a database is created.
EventLogCreateIndex is recorded when an index is created.
EventLogCreateSequence is recorded when a sequence is created.
EventLogCreateStatistics is recorded when statistics are collected for a table.
EventLogCreateTable is recorded when a table is created.
EventLogCreateView is recorded when a view is created.
EventLogDropDatabase is recorded when a database is dropped.
EventLogDropIndex is recorded when an index is dropped.
EventLogDropSequence is recorded when a sequence is dropped.
EventLogDropTable is recorded when a table is dropped.
EventLogDropView is recorded when a view is dropped.
EventLogFinishSchemaChange is recorded when a previously initiated schema change has completed.
EventLogFinishSchemaRollback is recorded when a previously initiated schema change rollback has completed.
EventLogNodeDecommissioned is recorded when a node is marked as decommissioning.
EventLogNodeJoin is recorded when a node joins the cluster.
EventLogNodeRecommissioned is recorded when a decommissioned node is recommissioned.
EventLogNodeRestart is recorded when an existing node rejoins the cluster after being offline.
EventLogRemoveZoneConfig is recorded when a zone config is removed.
EventLogReverseSchemaChange is recorded when an in-progress schema change encounters a problem and is reversed.
EventLogSetClusterSetting is recorded when a cluster setting is changed.
EventLogSetZoneConfig is recorded when a zone config is changed.
EventLogTruncateTable is recorded when a table is truncated.
FailedHashedValue is used as a default return value for when HashForReporting cannot hash a value correctly.
IdleTxnBlock means the session is outside of a transaction.
InFailedTxnBlock means the session is inside a transaction, but the transaction is in the Aborted state.
InternalAppNamePrefix indicates that the application name is internal to CockroachDB and therefore can be reported without scrubbing.
Constants for the String() representation of the session states.
InTxnBlock means the session is inside a transaction.
KVStringOptValidate values.
KVStringOptValidate values.
KVStringOptValidate values.
LeaseAcquireBlock denotes the LeaseAcquireResultBlockEvent is coming from tableState.acquire().
LeaseAcquireFreshestBlock denotes the LeaseAcquireResultBlockEvent is from tableState.acquireFreshestFromStore().
MaxSQLBytes is the maximum length in bytes of SQL statements serialized into a serverpb.Session.
NeedRowDesc specifies that a row description message is needed.
NewTable represents a new table, where the FK constraint is specified in the CREATE TABLE.
NonEmptyTable represents an existing non-empty table.
Constants for the String() representation of the session states.
Constants for the String() representation of the session states.
PgServerVersion is the latest version of postgres that we claim to support.
PgServerVersionNum is the latest version of postgres that we claim to support in the numeric format of "server_version_num".
RestartSavepointName is the only savepoint ident that we accept.
Constants for the String() representation of the session states.
TableTruncateChunkSize is the maximum number of keys deleted per chunk during a table truncation.

# Variables

BoundTxnStateTransitions is the state machine used by the InternalExecutor when running SQL inside a higher-level txn.
ClusterOrganization is the organization name.
ClusterSecret is a cluster specific secret.
CreatePartitioningCCL is the public hook point for the CCL-licensed partitioning creation code.
DistSQLClusterExecMode controls the cluster default for when DistSQL is used.
ExportPlanResultTypes is the result types for EXPORT plans.
GenerateSubzoneSpans is a hook point for a CCL function that constructs from a TableDescriptor the entries mapping zone config spans to subzones for use in the SubzoneSpans field of config.ZoneConfig.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
Fully-qualified names for metrics.
NoDependenciesAnalyzer is a DependencyAnalyzer that performs no analysis on planNodes and asserts that all plans are independent.
OptimizerClusterMode controls the cluster default for when the cost-based optimizer is used.
ReplicaOraclePolicy controls which policy the physical planner uses to choose a replica for a given range.
SerialNormalizationMode controls how the SERIAL type is interpreted in table definitions.
TxnStateTransitions describe the transitions used by a connExecutor's fsm.Machine.
UnsupportedVars contains the set of PostgreSQL session variables and client parameters that are not supported in CockroachDB.
VectorizeClusterMode controls the cluster default for when automatic vectorization is enabled.

# Structs

BindStmt is the Command for creating a portal from a prepared statement.
CachedPhysicalAccessor adds a cache on top of any SchemaAccessor.
ClusterWideID represents an identifier that is guaranteed to be unique across a cluster.
CommonLookupFlags is the common set of flags for the various accessor interfaces.
ConnectionHandler is the interface between the result of SetupConn and the ServeConn below.
CopyIn is the command for execution of the Copy-in pgwire subprotocol.
CreateUserNode creates entries in the system.users table.
DatabaseListFlags is the flag struct suitable for GetObjectNames().
DeletePreparedStmt is the Command for freeing a prepared statement.
DescribeStmt is the Command for producing info about a prepared statement or portal.
DistSQLPlanner is used to generate distributed plans from logical plans.
DistSQLReceiver is a RowReceiver that writes results to a rowResultWriter.
DrainRequest represents a notice that the server is draining and command processing should stop soon.
DropUserNode deletes entries from the system.users table.
EngineMetrics groups a set of SQL metrics.
An EventLogger exposes methods used to record events to the event table.
EventLogSetClusterSettingDetail is the json details for a settings change.
ExecPortal is the Command for executing a portal.
ExecStmt is the command for running a query sent through the "simple" pgwire protocol.
An ExecutorConfig encompasses the auxiliary objects and configuration required to create an executor.
ExecutorTestingKnobs is part of the context used to control parts of the system during testing.
Flush is a Command asking for the results of all previous commands to be delivered to the client.
IDVersion represents a descriptor ID, version pair that are meant to map to a single immutable descriptor.
InternalExecutor can be used internally by code modules to execute SQL statements without needing to open a SQL connection.
LeaseManager manages acquiring and releasing per-table leases.
LeaseManagerTestingKnobs contains test knobs.
LeaseStore implements the operations for acquiring and releasing leases and publishing a new version of a descriptor.
LeaseStoreTestingKnobs contains testing knobs.
LogicalSchemaAccessor extends an existing DatabaseLister with the ability to list tables in a virtual schema.
MemoryMetrics contains pointers to the metrics object for one of the SQL endpoints: - "client" for connections received via pgwire.
Metrics collects timeseries data about SQL activity.
NodeInfo contains metadata about the executing node and cluster.
ObjectLookupFlags is the flag struct suitable for GetObjectDesc().
ParallelizeQueue maintains a set of planNodes running with parallelized execution.
PhysicalPlan is a partial physical plan which corresponds to a planNode (partial in that it can correspond to a planNode subtree and not necessarily to the entire planNode for a given query).
PlanningCtx contains data used and updated throughout the planning process of a single query.
PreparedPortal is a PreparedStatement that has been bound with query arguments.
PreparedStatement is a SQL statement that has been parsed and the types of arguments and results have been determined.
PrepareStmt is the command for creating a prepared statement.
RowResultWriter is a thin wrapper around a RowContainer.
SchemaChangeManager processes pending schema changes seen in gossip updates.
SchemaChanger is used to change the schema on a table.
SchemaChangerTestingKnobs for testing the schema change execution path through both the synchronous and asynchronous paths.
SendError is a command that, upon execution, send a specific error to the client.
Server is the top level singleton for handling SQL connections.
SessionArgs contains arguments for serving a client connection.
SessionBoundInternalExecutor is like InternalExecutor, except that it is initialized with values for session variables.
SessionRegistry stores a set of all sessions on this node.
SessionTracing holds the state used by SET TRACING {ON,OFF,LOCAL} statements in the context of one SQL session.
SpanPartition is the intersection between a set of spans for a certain operation (e.g table scan) and the set of ranges owned by a given node.
Statement contains a statement with optional expected result columns and metadata.
StatementCounters groups metrics for counting different types of statements.
StmtBuf maintains a list of commands that a SQL client has sent for execution over a network connection.
StmtBufReader is an exported interface for reading a StmtBuf.
Sync is a command that serves two purposes: 1) It marks the end of one batch of commands and the beginning of the next.
TableCollection is a collection of tables held by a single session that serves SQL requests, or a background job using a table descriptor.
TestingSchemaChangerCollection is an exported (for testing) version of schemaChangerCollection.
UncachedPhysicalAccessor implements direct access to DB descriptors, without any kind of caching.
VirtualSchemaHolder is a type used to provide convenient access to virtual database and table descriptors.

# Interfaces

AuthorizationAccessor for checking authorization (e.g.
BindResult represents the result of a Bind command.
ClientComm is the interface used by the connExecutor for creating results to be communicated to client and for exerting some control over this communication.
ClientLock is an interface returned by ClientComm.lockCommunication().
Command is an interface implemented by all commands pushed by pgwire into the buffer.
CommandResult represents the result of a statement.
CommandResultClose is a subset of CommandResult dealing with the closing of the result.
CommandResultErrBase is the subset of CommandResult dealing with setting a query execution error.
CopyInResult represents the result of a CopyIn command.
DeleteResult represents the result of a DeletePreparedStatement command.
DependencyAnalyzer determines if plans are independent of one another, where independent plans are defined by whether their execution could be safely reordered without having an effect on their runtime semantics or on their results.
DescribeResult represents the result of a Describe command (for either describing a prepared statement or a portal).
DrainResult represents the result of a Drain command.
EmptyQueryResult represents the result of an empty query (a query representing a blank string).
ErrorResult represents the result of a SendError command.
FlushResult represents the result of a Flush command.
KeyRewriter describes helpers that can rewrite keys (possibly in-place).
LogicalSchema encapsulates the interfaces needed to be able to both look up schema objects and also resolve permissions on them.
ObjectDescriptor provides table information for results from a name lookup.
ParseResult represents the result of a Parse command.
PlanHookState exposes the subset of planner needed by plan hooks.
RestrictedCommandResult is a subset of CommandResult meant to make it clear that its clients don't close the CommandResult.
ResultBase is the common interface implemented by all the different command results.
SchemaAccessor provides access to database descriptors.
SchemaResolver abstracts the interfaces needed from the logical planner to perform name resolution below.
SyncResult represents the result of a Sync command.
VirtualTabler is used to fetch descriptors for virtual tables and databases.

# Type aliases

CmdPos represents the index of a command relative to the start of a connection.
No description provided by the author
DatabaseLookupFlags is the flag struct suitable for GetDatabaseDesc().
EventLogType represents an event type that can be recorded in the event log.
FKTableState is the state of the referencing table resolveFK() is called on.
No description provided by the author
KVStringOptValidate indicates the requested validation of a TypeAsStringOpts option.
LeaseAcquireBlockType is the type of blocking result event when calling LeaseAcquireResultBlockEvent.
No description provided by the author
No description provided by the author
PlanHookRowFn describes the row-production for hook-created plans.
PlanNode is the exported name for planNode.
RowDescOpt specifies whether a result needs a row description message.
No description provided by the author
SessionDefaults mirrors fields in Session, for restoring default configuration values in SET ..
StatementFilter is the type of callback that ExecutorTestingKnobs.StatementFilter takes.
SyncSchemaChangersFilter is the type of a hook to be installed through the ExecutorContext for blocking or otherwise manipulating schema changers run through the sync schema changers path.
No description provided by the author
No description provided by the author
TransactionStatusIndicator represents a pg identifier for the transaction state.
No description provided by the author
No description provided by the author