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

# Functions

CombinedTLP returns a single SQL query that compares the results of the two TLP queries: WITH unpart AS MATERIALIZED ( <unpartitioned query> ), part AS MATERIALIZED ( <partitioned query> ), undiff AS ( TABLE unpart EXCEPT ALL TABLE part ), diff AS ( TABLE part EXCEPT ALL TABLE unpart ) SELECT (SELECT count(*) FROM undiff), (SELECT count(*) FROM diff) This combined query can be used to check TLP equality with SQL comparison, which will sometimes differ from TLP equality checked with string comparison.
DisableCRDBFns causes the Smither to disable crdb_internal functions.
IgnoreFNs causes the Smither to ignore functions that match the regex.
NewSmither creates a new Smither.
PrefixStringConsts causes the Smither to add a prefix to all generated string constants.
RandSetting returns a random key from Settings.
RandSetup returns a random key from Setups.
RandTablesPrefixStringConsts is similar to the rand-tables setup but injects a prefix into string constants used in the CREATE TABLE statements.
SetComplexity configures the Smither's complexity, in other words the likelihood that at any given node the Smither will recurse and create a deeper query tree.
SetScalarComplexity configures the Smither's scalar complexity, in other words the likelihood that within any given scalar expression the Smither will recurse and create a deeper nested expression.
No description provided by the author

# Constants

NoParallel indicates that, if determinism is desired, this Setting should not be executed in parallel.
Parallel indicates that this Setting can be executed in parallel and still preserve determinism.
RandMultiRegionSetupName is the name of the table setup that creates random multi-region tables.
RandTableSetupName is the name of the table setup that creates random tables.
SeedMultiRegionSetupName is the name of the table setup that creates seed multi-region tables.
SeedSetupName is the name of the table setup that creates seed tables with most data types and some sample rows.

# Variables

AvoidConsts causes the Smither to prefer column references over generating constants.
CompareMode causes the Smither to generate statements that have deterministic output.
DisableAggregateFuncs disables window functions.
DisableCrossJoins causes the Smither to disable cross joins.
DisableDDLs causes the Smither to not emit statements that change table schema (CREATE, DROP, ALTER, etc.).
DisableDecimals disables use of decimal type columns in the query.
DisableEverything disables every kind of statement.
DisableIndexHints causes the Smither to disable generation of index hints.
DisableInsertSelect causes the Smither to avoid generating INSERT SELECT statements.
DisableJoins causes the Smither to disable joins.
DisableLimits causes the Smither to disable LIMIT clauses.
DisableMutations causes the Smither to not emit statements that could mutate any on-disk data.
DisableNondeterministicFns causes the Smither to disable nondeterministic functions.
DisableNondeterministicLimits causes the Smither to disable non-deterministic LIMIT clauses.
DisableOIDs disables use of OID types in the query.
DisableUDFs causes the Smither to disable user-defined functions.
DisableWindowFuncs disables window functions.
DisableWith causes the Smither to not emit WITH clauses.
EnableAlters enables ALTER statements.
EnableLimits causes the Smither to probabilistically emit LIMIT clauses.
EnableWith causes the Smither to probabilistically emit WITH clauses.
FavorCommonData increases the chances the Smither generates scalar data from a predetermined set of common values, as opposed to purely random values.
InsUpdOnly causes the Smither to emit 80% INSERT, 10% UPDATE, and 10% CREATE STATISTICS statements.
LowProbabilityWhereClauseWithJoinTables causes the Smither to generate WHERE clauses much less frequently in the presence of join tables.
MaybeSortOutput probabilistically adds ORDER by clause.
MultiRegionDDLs causes the Smither to enable multiregion features.
MutatingMode causes the Smither to generate mutation statements in the same way as the query-comparison roachtests (costfuzz and unoptimized-query-oracle).
MutationsOnly causes the Smither to emit 70% INSERT, 10% UPDATE, 10% DELETE, and 10% CREATE STATISTICS statements.
OnlyNoDropDDLs causes the Smither to only emit DDLs, but won't ever drop a table.
OnlySingleDMLs causes the Smither to only emit single-statement DML (SELECT, INSERT, UPDATE, DELETE) and CREATE STATISTICS statements.
OutputSort adds a top-level ORDER BY on all columns.
PostgresMode causes the Smither to generate statements that work identically in Postgres and Cockroach.
Settings is a collection of useful Setting options.
Setups is a collection of useful initial table states.
SimpleDatums causes the Smither to emit simpler constant datums.
SimpleNames specifies that complex name generation should be disabled.
SimpleScalarTypes causes the Smither to use simpler scalar types (e.g.
TestingPrettyCfg is only exposed to be used in tests.
UnlikelyConstantPredicate causes the Smither to make generation of constant WHERE clause, ON clause or HAVING clause predicates which only contain constant boolean expressions such as `TRUE` or `FALSE OR TRUE` much less likely.
UnlikelyRandomNulls causes the Smither to make random generation of null values much less likely than generation of random non-null data.

# Structs

Context holds information about what kinds of expressions are legal at a particular place in a query.
Setting defines options and execution modes for a Smither.
Smither is a sqlsmith generator.

# Interfaces

SmitherOption is an option for the Smither client.

# Type aliases

ExecMode definitions define how a Setting can be executed.
SettingFunc generates a Setting.
Setup generates a SQL query that can be executed to initialize a database for smithing.