package
19.1.0-rc.1+incompatible
Repository: https://github.com/dchenk/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.
CreateTableDebug is identical to debug, but allows for the added option of printing the table and its contents upon creation.
CreateTableInterleaved is identical to CreateTable with the added option of specifying an interleave schema for interleaving the table.
CreateTableInterleavedDebug is identical to CreateTableInterleaved with the option of printing the table being created.
CreateTestInterleavedHierarchy generates the following interleaved hierarchy for testing: <table> <primary index/interleave prefix> <nrows> parent1 (pid1) 100 child1 (pid1, cid1, cid2) 250 grandchild1 (pid1, cid1, cid2, gcid1) 1000 child2 (pid1, cid3, cid4) 50 parent2 (pid1) 20.
DeleteZoneConfig deletes the specified zone config through the SQL interface.
GetScrubResultRows will scan and unmarshal ScrubResults from a Rows iterator.
IntToEnglish returns an English (pilot style) string for the given integer, for example: IntToEnglish(135) = "one-three-five".
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 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.
QueryDatabaseID returns the database ID of the specified database 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.
RowModuloShiftedFn creates a GenValueFn that uses the following recursive function definition F(row, modulo), where modulo is []int F(row, []) = row F(row, modulo) = F((row - 1) % modulo[0] + 1, modulo[1:]) and returns the result as a DInt.
RowsToStrMatrix converts the given result rows to a string matrix; nulls are represented as "NULL".
RunResolveColumnItemTest tests that the given ColumnItemResolverTester correctly resolves column names.
RunResolveQualifiedStarTest tests that the given ColumnItemResolverTester correctly resolves names of the form "<tableName>.*".
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.
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.
ZoneConfigExists returns whether a zone config with the provided cliSpecifier exists.

# Constants

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

# Structs

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 testing.TB 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

ColumnItemResolverTester is an interface that should be implemented by any struct that also implements tree.ColumnItemResolver.
DBHandle is an interface that applies to *gosql.DB, *gosql.Conn, and *gosql.Tx.

# 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.