Liking cljdoc? Tell your friends :D

pgmalli.core

Generate malli schemas from an applied PostgreSQL schema, and use them.

Generation (needs psql): generate!, stale. Application side (files on the classpath as pgmalli/<schema>.edn): registry, unrendered, columns, transformer, dataset-schema, dataset-generator.

The config (pgmalli.impl.generate), the generated file layout and the fact vocabulary (pgmalli.impl.pattern) are the stable contract; pgmalli.impl.* may change without notice.

Generate malli schemas from an applied PostgreSQL schema, and use them.

Generation (needs psql): generate!, stale.
Application side (files on the classpath as pgmalli/<schema>.edn): registry, unrendered,
columns, transformer, dataset-schema, dataset-generator.

The config (pgmalli.impl.generate), the generated file layout and the fact vocabulary
(pgmalli.impl.pattern) are the stable contract; pgmalli.impl.* may change without notice.
raw docstring

columnsclj

(columns registry name)

The [:map ...] of a row or insert schema, without the table-level constraints.

The [:map ...] of a row or insert schema, without the table-level constraints.
sourceraw docstring

dataset-generatorclj

(dataset-generator registry)
(dataset-generator registry opts)

test.check generator of datasets satisfying dataset-schema. Options: :rows wanted per table (default 5), :except tables ("schema.table") to leave out (no kept table may reference them). Tables that came out short are listed in the dataset's metadata under :pgmalli/short.

test.check generator of datasets satisfying dataset-schema. Options: :rows wanted per table
(default 5), :except tables ("schema.table") to leave out (no kept table may reference them).
Tables that came out short are listed in the dataset's metadata under :pgmalli/short.
sourceraw docstring

dataset-schemaclj

(dataset-schema registry)

Schema for {"schema.table" [row ...]} datasets: rows, primary keys, unique constraints and foreign keys checked across the registry's tables.

Schema for {"schema.table" [row ...]} datasets: rows, primary keys, unique constraints and
foreign keys checked across the registry's tables.
sourceraw docstring

generate!clj

(generate! config)

Writes the generated file for every schema in the config. Returns {schema path}.

Writes the generated file for every schema in the config. Returns {schema path}.
sourceraw docstring

registryclj

(registry & schemas)

malli registry holding the generated schemas of the named schemas (read from the classpath; generated data maps are accepted too), insert schemas derived from them, plus malli's defaults, malli.util and malli.experimental.time.

malli registry holding the generated schemas of the named schemas (read from the classpath;
generated data maps are accepted too), insert schemas derived from them, plus malli's
defaults, malli.util and malli.experimental.time.
sourceraw docstring

staleclj

(stale config)

{schema [only-in-file only-in-db]} for schemas whose file differs from what the database yields now; nil when everything matches. A missing file counts as entirely stale.

{schema [only-in-file only-in-db]} for schemas whose file differs from what the database
yields now; nil when everything matches. A missing file counts as entirely stale.
sourceraw docstring

transformerclj

(transformer)
(transformer opts)

malli transformer decoding JDBC and string values into the registry's types. Instants and java.util.Dates that land in date or timestamp (without time zone) columns are read in :zone, default the JVM's; JSON text in json and jsonb columns is parsed.

malli transformer decoding JDBC and string values into the registry's types. Instants and
java.util.Dates that land in date or timestamp (without time zone) columns are read in
:zone, default the JVM's; JSON text in json and jsonb columns is parsed.
sourceraw docstring

unrenderedclj

(unrendered schema-name)

Facts of a schema that have no malli rendering.

Facts of a schema that have no malli rendering.
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