Generate malli schemas from an applied PostgreSQL schema.
Config: {:schemas ["public"] ; default ["public"] :out-dir "resources/pgmalli" ; default; one file per schema, <out-dir>/<schema>.edn :overrides {constraint-name malli-schema | {:skip reason}} :db {:host :port :db :user :password :sslmode :psql}} ; optional; psql's environment otherwise
The config, the generated file layout and the fact vocabulary (see pgmalli.impl.pattern) are the stable contract. pgmalli.impl.* may change without notice.
Generate malli schemas from an applied PostgreSQL schema.
Config:
{:schemas ["public"] ; default ["public"]
:out-dir "resources/pgmalli" ; default; one file per schema, <out-dir>/<schema>.edn
:overrides {constraint-name malli-schema | {:skip reason}}
:db {:host :port :db :user :password :sslmode :psql}} ; optional; psql's environment otherwise
The config, the generated file layout and the fact vocabulary (see pgmalli.impl.pattern)
are the stable contract. pgmalli.impl.* may change without notice.(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}.
(path config schema)Path of the generated file for a schema.
Path of the generated file for a schema.
(registry path)The registry in a generated file, ready for (merge (malli.core/default-schemas) ...).
The registry in a generated file, ready for (merge (malli.core/default-schemas) ...).
(stale config)Difference between the generated files and what the database yields now, as {schema [only-in-file only-in-db]}; nil when everything matches. A missing file counts as entirely stale. :database-version is ignored.
Difference between the generated files and what the database yields now, as
{schema [only-in-file only-in-db]}; nil when everything matches. A missing file counts
as entirely stale. :database-version is ignored.(unrendered path)Facts in a generated file that have no malli rendering.
Facts in a generated file that have no malli rendering.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |