package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

CreateTable creates a table in the "test" database with the given number of rows and using the given row generation function.
DeleteZoneConfig deletes the specified zone config through the SQL interface.
GetScrubResultRows will scan and unmarshal ScrubResults from a Rows iterator.
InjectDescriptors attempts to inject the provided descriptors into the database.
IntToEnglish returns an English (pilot style) string for the given integer, for example: IntToEnglish(135) = "one-three-five".
MakeRoundRobinDBHandle creates a RoundRobinDBHandle.
MakeRoundRobinSQLRunner returns a SQLRunner that uses a set of database connections, in a round-robin fashion.
MakeSQLRunner returns a SQLRunner for the given database connection.
MatrixToStr converts a set of rows into a single string where each row is on a separate line and the columns with a row are comma separated.
PGUrl is like PGUrlE, but uses t.Fatal to handle errors.
PGUrlE returns a postgres connection url which connects to this server with the given user, and a cleanup function which must be called after all connections created using the connection url have been closed.
PGUrlWithOptionalClientCerts is like PGUrlWithOptionalClientCertsE, but uses t.Fatal to handle errors.
PGUrlWithOptionalClientCertsE is like PGUrlE but the caller can customize whether the client certificates are loaded on-disk and in the URL.
PGXRowsToDataDrivenOutput converts a pgx.Rows object into an appropriate string for usage in data driven tests.
QueryDatabaseID returns the database ID of the specified database using the system.namespace table.
QuerySchemaID returns the schema ID of the specified database.schema using the system.namespace table.
QueryTableID returns the table ID of the specified database.table using the system.namespace table.
RemoveAllZoneConfigs removes all installed zone configs.
RowEnglishFn is a GenValueFn which returns an English representation of the row number, as a DString.
RowIdxFn is a GenValueFn that returns the row number as a DInt.
RowModuloFn creates a GenValueFn that returns the row number modulo a given value as a DInt.
RowsToDataDrivenOutput converts a gosql.Rows object into an appropriate string for usage in data driven tests.
RowsToStrMatrix converts the given result rows to a string matrix; nulls are represented as "NULL".
RunScrub will run execute an exhaustive scrub check for a table.
RunScrubWithOptions will run a SCRUB check for a table with the specified options string.
SetZoneConfig updates the specified zone config through the SQL interface.
ToRowFn creates a GenRowFn that returns rows of values generated by the given GenValueFns (one per column).
TxnSetZoneConfig updates the specified zone config through the SQL interface using the provided transaction.
VerifyAllZoneConfigs verifies that the specified ZoneRows exactly match the list of active zone configs.
VerifyParseError is used in the SQL and PL/pgSQL datadriven parser tests to check that an unsuccessfully parsed expression returns an expected error.
VerifyParseFormat is used in the SQL and PL/pgSQL datadriven parser tests to check that a successfully parsed expression round trips and correctly handles formatting flags.
VerifyStatementPrettyRoundtrip verifies that the SQL statements in s correctly round trip through the pretty printer.
VerifyZoneConfigForTarget verifies that the specified zone matches the specified ZoneRow.
WaitForSpanConfigReconciliation waits for span config reconciliation to ensure that MR changes are propagated.
ZoneConfigExists returns whether a zone config with the provided name exists.

# Constants

TestDB is the name of the database created for test tables.

# Structs

RoundRobinDBHandle aggregates multiple DBHandles into a single one; each time a query is issued, a handle is selected in round-robin fashion.
Row is a wrapper around gosql.Row that kills the test on error.
ScrubResult is the go struct for the row results for an EXPERIMENTAL SCRUB query.
SQLRunner wraps a Fataler and *gosql.DB connection and provides convenience functions to run SQL statements and fail the test on any errors.
ZoneRow represents a row returned by SHOW ZONE CONFIGURATION.

# Interfaces

DBHandle is an interface that applies to *gosql.DB, *gosql.Conn, and *gosql.Tx, as well as *RoundRobinDBHandle.
Fataler is the subset of testing.TB relevant to this package.

# Type aliases

GenRowFn is a function that takes a (1-based) row index and returns a row of Datums that will be converted to strings to form part of an INSERT statement.
GenValueFn is a function that takes a (1-based) row index and returns a Datum which will be converted to a string to form part of an INSERT statement.