package
1.1.0-rc.1
Repository: https://github.com/soopsio/cockroach.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package distsqlrun is a generated protocol buffer package.
No description provided by the author
Package jobs is a generated protocol buffer package.
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

# Functions

AddPlanHook adds a hook used to short-circuit creating a planNode from a parser.Statement.
CheckPrivilege verifies that `user`` has `privilege` on `descriptor`.
DistSQLExecModeFromString converts a string into a DistSQLExecMode.
DropTableDesc removes a descriptor from the KV database.
DropTableName removes a mapping from name to ID from the KV database.
EvalAsOfTimestamp evaluates and returns the timestamp from an AS OF SYSTEM TIME clause.
GenerateInsertRow prepares a row tuple for insertion.
GenerateUniqueDescID returns the next available Descriptor ID and increments the counter.
GetKeysForTableDescriptor retrieves the KV keys corresponding to the zone, name and descriptor of a table.
GetTableDesc returns the table descriptor for the table with 'id'.
GetUserHashedPassword returns the hashedPassword for the given username if found in system.users.
GetZoneConfig returns the zone config for the object with 'id'.
HashAppName 1-way hashes an application names for use in stat reporting.
HoistConstraints finds column constraints defined inline with the columns and moves them into n.Defs as constraints.
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.
MakeTableDesc creates a table descriptor from a CreateTable statement.
MustGetDatabaseDesc looks up the database descriptor given its name, returning an error if the descriptor is not found.
MustGetDatabaseDescByID looks up the database descriptor given its ID, returning an error if the descriptor is not found.
MustGetTableDesc returns a table descriptor for a table, or an error if the descriptor is not found.
MustGetTableOrViewDesc returns a table descriptor for either a table or view, or an error if the descriptor is not found.
NewExecutor creates an Executor and registers a callback on the system config.
NewLeaseManager creates a new LeaseManager.
NewRowResultWriter creates a new RowResultWriter.
NewSchemaChangeManager returns a new SchemaChangeManager.
NewSchemaChangerForTesting only for tests.
NewSession creates and initializes a new Session object.
NewSpanBasedDependencyAnalyzer creates a new SpanBasedDependencyAnalyzer.
NewStatementList creates a StatementList from a parser.StatementList.
NewWireFailureError returns a new WireFailureError which wraps err.
NormalizeAndValidateUsername case folds the specified username and verifies it validates according to the usernameRE regular expression.
RecomputeViewDependencies does the work of CREATE VIEW w.r.t.
TestDisableTableLeases disables table leases and returns a function that can be used to enable it.

# 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.
DistSQLAlways means that we only use distSQL; unsupported queries fail.
DistSQLAuto means that we automatically decide on a case-by-case basis if we use distSQL.
DistSQLOff means that we never use distSQL.
DistSQLOn means that we use distSQL for queries that are supported.
EventLogAlterTable is recorded when a table is altered.
EventLogCreateDatabase is recorded when a database is created.
EventLogCreateIndex is recorded when an index 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.
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.
EventLogNodeJoin is recorded when a node joins the cluster.
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.
MaxSQLBytes is the maximum length in bytes of SQL statements serialized into a serverpb.Session.
No txn is in scope.
A txn is in scope.
PgServerVersion is the latest version of postgres that we claim to support.
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.
DistSQLClusterExecMode controls the cluster default for when DistSQL is used.
LeaseDuration is the mean duration a lease will be acquired for.
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.
NilVirtualTabler implements VirtualTabler that returns nil.
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.

# Structs

CopyDataBlock represents a data block of a COPY FROM statement.
DistLoader uses DistSQL to convert external data formats (csv, etc) into sstables of our mvcc-format key values.
DistSQLPlannerTestingKnobs is used to control internals of the distSQLPlanner for testing purposes.
An EventLogger exposes methods used to record events to the event table.
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.
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.
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.
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.
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.
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.
StatementResults represents a list of results from running a batch of SQL statements, plus some meta info about the batch.
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.
WireFailureError is used when sending data over pgwire fails.
WrappableMemoryAccount encapsulates a MemoryAccount to give it the Wsession()/Wtxn() method below.
WrappedMemoryAccount is the transient structure that carries the extra argument to the MemoryAccount APIs.

# Interfaces

AuthorizationAccessor for checking authorization (e.g.
DatabaseAccessor provides helper methods for using SQL database descriptors.
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.
DescriptorAccessor provides helper methods for using descriptors to SQL objects.
PlanHookState exposes the subset of planner needed by plan hooks.
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 helper methods for using the SQL schema.
StatementResult is used to produce results for a single query (see ResultsWriter).
VirtualTabler is used to fetch descriptors for virtual tables and databases.

# Type aliases

DistSQLExecMode controls if and when the Executor uses DistSQL.
EventLogType represents an event type that can be recorded in the event log.
ResultList represents a list of results for a list of SQL statements.
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.
TxnStateEnum represents the state of a SQL txn.