Skip to main content

Module random_scopes

Module random_scopes 

Source
Expand description

Random live queries and writes over a schema whose joins, views, subqueries and conditions sqlive narrows by, so a test can check that a live query runs again whenever a commit changes what it returns. sqlive’s own test runs them over plain tables, and a host’s test runs them over the host’s own writes. A seed reproduces a case.

Structs§

Generated
One generated live query.
Rng
A small deterministic generator, so a seed reproduces a case.
Write
One generated write.

Constants§

CAPTURED
The table keyed by text, which a host captures, or syncs.
SCHEMA
Tables keyed by integer, and a captured one keyed by text, with columns whose small domains make values collide, and text values that name the captured table’s keys, so joins find rows.
SHAPES
The kinds of source a generated query reads from, which a test holds a precision bound for each of.
TABLES
The generated tables.

Functions§

a_value
A value of the column a, as SQL.
b_value
A value of the column b, as SQL.
key
The key id of a row of table, as SQL.
query
A live query over the generated tables and views.
write
A write of one to three statements.