package
0.0.0-20160920194302-ad86efcaa21b
Repository: https://github.com/a10y/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.
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.
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.
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.
ToRowFn creates a GenRowFn that returns rows of values generated by the given GenValueFns (one per column).
# Structs
SQLRunner wraps a testing.TB and *gosql.DB connection and provides convenience functions to run SQL statements and fail the test on any errors.
# 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.