Liking cljdoc? Tell your friends :D

wagoe.ai.core.admin-entity

Pure checks and corrections for a generated admin entity config (BOU-567).

The model is asked for the right types and relations and does not reliably give them, so what the project already knows — its migrations — decides the types, and what the description asked for is checked before anything is written.

Pure checks and corrections for a generated admin entity config (BOU-567).

The model is asked for the right types and relations and does not reliably
give them, so what the project already knows — its migrations — decides the
types, and what the description asked for is checked before anything is
written.
raw docstring

apply-column-typesclj

(apply-column-types config col-types)

config with each field's :type taken from the table's col-types.

Returns {:config .. :corrections [{:field :from :to}]}.

`config` with each field's :type taken from the table's `col-types`.

Returns {:config .. :corrections [{:field :from :to}]}.
sourceraw docstring

column-typesclj

(column-types columns)

A table's columns as {:kebab-field admin-type}, skipping unknown SQL types.

A table's columns as {:kebab-field admin-type}, skipping unknown SQL types.
sourceraw docstring

infer-typesclj

(infer-types config)

For a table that does not exist yet: a date-named :instant becomes :date, and a quantity, count or amount in cents typed :decimal becomes :int.

For a table that does not exist yet: a date-named :instant becomes :date,
and a quantity, count or amount in cents typed :decimal becomes :int.
sourceraw docstring

migration-columnsclj

(migration-columns sqls)

{table-name {column-name sql-type}} after applying sqls, the up migrations in the order they run. Names are lower-case and unquoted, as in the SQL.

{table-name {column-name sql-type}} after applying `sqls`, the up migrations
in the order they run. Names are lower-case and unquoted, as in the SQL.
sourceraw docstring

missing-keysclj

(missing-keys entities requested)

The keys in requested that no entity in entities carries.

The keys in `requested` that no entity in `entities` carries.
sourceraw docstring

prepareclj

(prepare entities edn-text tables description)

Check and correct a parsed answer: entities is the EDN value, edn-text its text, tables what migration-columns read, description the request.

Returns {:entities [{:entity-name :text :type-source :corrections}]} with one file's text per entity, or {:error str}.

Check and correct a parsed answer: `entities` is the EDN value, `edn-text`
its text, `tables` what `migration-columns` read, `description` the request.

Returns {:entities [{:entity-name :text :type-source :corrections}]} with
one file's text per entity, or {:error str}.
sourceraw docstring

renderclj

(render entities)

entities as EDN text, one key per line, in the order people read them.

`entities` as EDN text, one key per line, in the order people read them.
sourceraw docstring

requested-keysclj

(requested-keys description)

The relation keys description asks for.

The relation keys `description` asks for.
sourceraw docstring

sql-type->field-typeclj

(sql-type->field-type sql-type)

The admin field type for a SQL column type, or nil when there is none.

The admin field type for a SQL column type, or nil when there is none.
sourceraw docstring

validation-errorsclj

(validation-errors entities)

One "[path] problem" line per schema error in entities, or nil when they are valid. An unknown key is named where it sits (BOU-572).

One "[path] problem" line per schema error in `entities`, or nil when
they are valid. An unknown key is named where it sits (BOU-572).
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