Liking cljdoc? Tell your friends :D

wagoe.platform.shell.database.seed

Loads a seed file into the active database.

The pure parts — validation, kebab->snake conversion, plan building — live in wagoe.platform.core.database.seed. This namespace owns the I/O: reading the file, acquiring the datasource, and executing the inserts.

Loads a seed file into the active database.

The pure parts — validation, kebab->snake conversion, plan building — live in
`wagoe.platform.core.database.seed`. This namespace owns the I/O: reading the
file, acquiring the datasource, and executing the inserts.
raw docstring

default-seed-pathclj

source

read-seed-fileclj

(read-seed-file path)

Reads and parses a seed file.

Returns {:ok data}, or {:error {...}} when the file is missing or is not readable EDN. A malformed seed file is a user-facing mistake, so the parse failure is caught here and turned into a value rather than a stack trace.

Reads and parses a seed file.

Returns `{:ok data}`, or `{:error {...}}` when the file is missing or is not
readable EDN. A malformed seed file is a user-facing mistake, so the parse
failure is caught here and turned into a value rather than a stack trace.
sourceraw docstring

run-seed!clj

(run-seed!)
(run-seed! path)

Reads path, validates it, and inserts every row in one transaction.

All-or-nothing on purpose: a half-applied seed leaves a database that looks populated but is not, which is harder to notice than an outright failure.

Returns {:ok {:tables n :rows n :detail [...]}} or {:error {...}}.

Reads `path`, validates it, and inserts every row in one transaction.

All-or-nothing on purpose: a half-applied seed leaves a database that looks
populated but is not, which is harder to notice than an outright failure.

Returns `{:ok {:tables n :rows n :detail [...]}}` or `{:error {...}}`.
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