Liking cljdoc? Tell your friends :D

pgmalli.impl.dataset

Datasets: several tables of rows at once, with keys and references checked against the registry, and generated so that they hold.

Datasets: several tables of rows at once, with keys and references checked against the
registry, and generated so that they hold.
raw docstring

dataset-generatorclj

(dataset-generator registry)
(dataset-generator registry {:keys [rows except] :or {rows 5}})

test.check generator of datasets that satisfy dataset-schema: tables are generated in foreign-key order and referencing columns are pointed at rows generated before them (a self-reference at the same table); a reference that finds no fitting row grows its target table by one row that fits, whose own references may grow their targets in turn. :rows is the number of rows wanted per table, out of many more candidates; a table that comes out short (a CHECK random rows cannot satisfy, a parent that came out empty) is recorded in the dataset's metadata under :pgmalli/short with the reasons, and its children come out short too. :except names tables ("schema.table") to leave out; a kept table may not reference one of them.

test.check generator of datasets that satisfy dataset-schema: tables are generated in
foreign-key order and referencing columns are pointed at rows generated before them (a
self-reference at the same table); a reference that finds no fitting row grows its target
table by one row that fits, whose own references may grow their targets in turn. :rows is
the number of rows wanted per table, out of many more candidates; a table that comes out
short (a CHECK random rows cannot satisfy, a parent that came out empty) is recorded in
the dataset's metadata under :pgmalli/short with the reasons, and its children come out
short too. :except names tables ("schema.table") to leave out; a kept table may not
reference one of them.
sourceraw docstring

dataset-schemaclj

(dataset-schema registry)

Schema for {"schema.table" [row ...] ...} covering every table of the registry: rows validate against their row schemas, and every primary key, unique constraint and foreign key is a check of its own, named in its error. The result contains functions, so it is built at runtime.

Schema for {"schema.table" [row ...] ...} covering every table of the registry: rows validate
against their row schemas, and every primary key, unique constraint and foreign key is a
check of its own, named in its error. The result contains functions, so it is built at runtime.
sourceraw docstring

key-ofclj

(key-of row columns)
source

tablesclj

(tables registry)
(tables registry except)

[{:name :table :key-sets :refs} ...] for every row schema but those in except. A key set is {:columns :nulls-distinct? :label}; a reference {:columns :table :to :full? :label}, references to tables outside the dataset left out.

[{:name :table :key-sets :refs} ...] for every row schema but those in except. A key set is
{:columns :nulls-distinct? :label}; a reference {:columns :table :to :full? :label},
references to tables outside the dataset left out.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close