package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
Collect is a convenience wrapper around [pgx.CollectRows] that logs the query and results via [LogQueryResults].
CollectOne is a convenience wrapper around [pgx.CollectOneRow] that logs the query and results via [LogQueryResults].
EndSpan is a helper for ending a span and annotating it with error information, if relevant.
Generate is a helper to produce a psuedo-random case for a given [tree.Statement].
PickAtLeast returns [`atLeast`, `len(options)`] elements from options in a random order.
PickBetween returns [`atLeast`, `atMost`] elements from options.
PickOne returns a random element from options.
Scan is a convenience wrapper around [CollectOne] that uses [pgx.RowTo] as fn.
With is a helper for building queries utilizing Common Table Expressions (CTEs).
# Variables
ErrCaseNotPossible is a sentinel indicating that an elected case could not occur.
ErrSchemaChangesDisallowedDueToPkSwap is generated when schema changes are disallowed on a table because PK swap is already in progress.
# Structs
ErrorState wraps schemachange workload errors to have state information for the purpose of dumping in our JSON log.
GenerationCase is an "interesting" form of a specific [tree.Statement] and the [pgcode.Code] it is expected to return.
LogEntry is used to log information about the operations performed, expected errors, the worker ID, the corresponding timestamp, and any additional messages or error states.
OpGenLogMessage an informational message directly written into the OpGen log.
OpGenLogQuery a query with a single value result.
OTLPFileClient is a [otlptrace.Client] that "uploads" spans to a .ndjson.gz file instead of sending them to a remote server.
# Type aliases
Values is a helper for formatting a list of SQL values within a [GenerationCase].