Liking cljdoc? Tell your friends :D

wagoe.platform.core.database.migration-sql

Migration SQL written for PostgreSQL, H2 and SQLite, rewritten for MySQL.

The scaffolder writes one migration for every database (BOU-569). MySQL has no UUID or zoned TIMESTAMP type, takes no IF NOT EXISTS on an index, and ignores a REFERENCES written on a column. Only that is rewritten, so SQL written for MySQL passes through as it is.

Migration SQL written for PostgreSQL, H2 and SQLite, rewritten for MySQL.

The scaffolder writes one migration for every database (BOU-569). MySQL has
no UUID or zoned TIMESTAMP type, takes no IF NOT EXISTS on an index, and
ignores a REFERENCES written on a column. Only that is rewritten, so SQL
written for MySQL passes through as it is.
raw docstring

wagoe.platform.core.database.query

Pure functions for SQL query building and transformation.

All functions in this namespace are pure - they take data and return data without side effects. No I/O, logging, or state mutation.

Pure functions for SQL query building and transformation.

All functions in this namespace are pure - they take data and return data
without side effects. No I/O, logging, or state mutation.
raw docstring

wagoe.platform.core.database.seed

Pure logic for database seeding.

A seed file is EDN, in either of two shapes.

A map of table -> rows, for the simple case:

{:tasks [{:title "Try the admin UI" :done false} {:title "Read AGENTS.md" :done true}]}

Or a vector of [table rows] pairs, which is ordered:

[[:users [{:email "admin@example.com"}]] [:tasks [{:title "Owned by that user" :user-id 1}]]]

Insert order matters as soon as one table references another, and EDN maps only preserve their written order up to 8 entries — a 9th turns the literal into a PersistentHashMap and the order becomes hash order. Rather than let a seed file quietly start inserting children before parents once it grows, a map larger than that is rejected with a pointer to the vector form.

Table and column names are written in kebab-case, like the rest of the codebase; the conversion to snake_case happens here, at the point where the data becomes a persistence concern.

Everything in this namespace is pure. Validation returns typed error values rather than throwing — the shell decides how to present them.

Pure logic for database seeding.

A seed file is EDN, in either of two shapes.

A map of table -> rows, for the simple case:

  {:tasks [{:title "Try the admin UI" :done false}
           {:title "Read AGENTS.md"   :done true}]}

Or a vector of [table rows] pairs, which is ordered:

  [[:users [{:email "admin@example.com"}]]
   [:tasks [{:title "Owned by that user" :user-id 1}]]]

Insert order matters as soon as one table references another, and EDN maps
only preserve their written order up to 8 entries — a 9th turns the literal
into a PersistentHashMap and the order becomes hash order. Rather than let a
seed file quietly start inserting children before parents once it grows, a
map larger than that is rejected with a pointer to the vector form.

Table and column names are written in kebab-case, like the rest of the
codebase; the conversion to snake_case happens here, at the point where the
data becomes a persistence concern.

Everything in this namespace is pure. Validation returns typed error values
rather than throwing — the shell decides how to present them.
raw 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