package
2.1.0-alpha.20180416+incompatible
Repository: https://github.com/coyle/cockroach.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
Package distsqlrun is a generated protocol buffer package.
Package jobs is a generated protocol buffer package.
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
Package sqlbase is a generated protocol buffer package.
No description provided by the author
Package stats is a generated protocol buffer package.
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`.
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.
DropTableDesc removes a descriptor from the KV database.
EvalAsOfTimestamp evaluates and returns the timestamp from an AS OF SYSTEM TIME clause.
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.
HoistConstraints finds column constraints defined inline with their columns and makes them table-level constraints, stored in n.Defs.
IsStmtParallelized determines if a given statement's execution should be parallelized.
MakeEventLogger constructs a new EventLogger.
MakeMemMetrics instantiates the metric objects for an SQL endpoint.
MakeParallelizeQueue creates a new empty ParallelizeQueue that uses the provided DependencyAnalyzer to determine plan dependencies.
MakeSessionRegistry creates a new SessionRegistry with an empty set of sessions.
MakeStmtBufReader creates a StmtBufReader.
MakeTableDesc creates a table descriptor from a CreateTable statement.
MustGetDatabaseDescByID looks up the database descriptor given its ID, returning an error if the descriptor is not found.
NewDistSQLPlanner initializes a DistSQLPlanner.
NewExecutor creates an Executor and registers a callback on the system config.
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.
NewSession creates and initializes a new Session object.
NewSpanBasedDependencyAnalyzer creates a new SpanBasedDependencyAnalyzer.
NewStatementList creates a StatementList from a tree.StatementList.
NewStmtBuf creates a StmtBuf.
NewVirtualSchemaHolder creates a new VirtualSchemaHolder.
NewWireFailureError returns a new WireFailureError which wraps err.
NewZeroNode is the exported version of makeZeroNode.
NormalizeAndValidateUsername case folds the specified username and verifies it validates according to the usernameRE regular expression.
ProcessComputedColumns adds columns which are computed to the set of columns being updated and returns the computation exprs for those columns.
ResolveDatabase looks up a database name.
ResolveExistingObject looks up an existing object.
ResolveTargetObject determines a valid target path for an object that may not exist yet.
ShowCreatePartitioning returns a PARTITION BY clause for the specified index, if applicable.
SimplifyExpr transforms an expression such that it contains only expressions involving IndexedVars that can be used for index selection.
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

The txn has encountered a (non-retriable) error.
Like Open, a txn is in scope.
The KV txn has been committed successfully through a RELEASE.
DontNeedRowDesc specifies that a row description message is not needed.
EventLogAlterIndex is recorded when an index is altered.
EventLogAlterSequence is recorded when a sequence is altered.
EventLogAlterTable is recorded when a table is altered.
EventLogCreateDatabase is recorded when a database is created.
EventLogCreateIndex is recorded when an index is created.
EventLogCreateSequence is recorded when a sequence is created.
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.
EventLogReverseSchemaChange is recorded when an in-progress schema change encounters a problem and is reversed.
EventLogSetClusterSetting is recorded when a cluster setting is changed.
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.
InTxnBlock means the session is inside a transaction.
LeaseAcquireBlock denotes the LeaseAcquireResultBlockEvent is coming from tableState.acquire().
LeaseAcquireFreshestBlock denotes the LeaseAcquireResultBlockEvent is from tableState.acquireFreshestFromStoreLocked().
MaxSQLBytes is the maximum length in bytes of SQL statements serialized into a serverpb.Session.
NeedRowDesc specifies that a row description message is needed.
No txn is in scope.
A txn is in scope.
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".
The txn has encountered a retriable error.
TableTruncateChunkSize is the maximum number of keys deleted per chunk during a table truncation.

# Variables

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.
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 SubzonzeSpans 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.
MinSchemaChangeLeaseDuration is the minimum duration a lease will have remaining upon acquisition.
NoDependenciesAnalyzer is a DependencyAnalyzer that performs no analysis on planNodes and asserts that all plans are independent.
SchemaChangeLeaseDuration is the duration a lease will be acquired for.
TxnStateTransitions describe the transitions used by a connExecutor's fsm.Machine.

# 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.
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.
DistLoader uses DistSQL to convert external data formats (csv, etc) into sstables of our mvcc-format key values.
DistSQLPlanner is used to generate distributed plans from logical plans.
DistSQLPlannerTestingKnobs is used to control internals of the DistSQLPlanner for testing purposes.
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 Executor executes SQL statements.
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.
InternalExecutor can be used internally by cockroach 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.
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.
PreparedPortal is a PreparedStatement that has been bound with query arguments.
PreparedPortals is a mapping of PreparedPortal names to their corresponding PreparedPortals.
PreparedStatement is a SQL statement that has been parsed and the types of arguments and results have been determined.
PreparedStatements is a mapping of PreparedStatement names to their corresponding PreparedStatements.
PrepareStmt is the command for creating a prepared statement.
Result corresponds to the execution of a single SQL statement.
RowBuffer is a buffer for rows of DTuples.
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.
Session contains the state of a SQL client connection.
SessionArgs contains arguments for creating a new Session with NewSession().
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.
Statement contains a statement with optional expected result columns and metadata.
StatementCounters groups metrics for counting different types of statements.
StatementResults represents a list of results from running a batch of SQL statements, plus some meta info about the batch.
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.
WireFailureError is used when sending data over pgwire fails.

# 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.
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.
ResultsGroup is used to produce a result group (see ResultsWriter).
ResultsWriter is the interface used to by the Executor to produce results for query execution for a SQL client.
SchemaAccessor provides access to database descriptors.
SchemaResolver abstracts the interfaces needed from the logical planner to perform name resolution below.
StatementResult is used to produce results for a single query (see ResultsWriter).
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.
LeaseAcquireBlockType is the type of blocking result event when calling LeaseAcquireResultBlockEvent.
No description provided by the author
No description provided by the author
PlanNode is the exported name for planNode.
ResultList represents a list of results for a list of SQL statements.
RowDescOpt specifies whether a result needs a row description message.
No description provided by the author
StatementFilter is the type of callback that ExecutorTestingKnobs.StatementFilter takes.
StatementList is a list of statements.
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.
TxnStateEnum represents the state of a SQL txn.
No description provided by the author