adl-support.forms-support

Application Description Language support - functions useful in
generating forms.

all-keys-present?

macro

(all-keys-present? m keys)
Return true if all the keys in `keys` are present in the map `m`.

auxlist-data-name

macro

(auxlist-data-name auxlist)
The name to which data for this `auxlist` will be bound in the
Selmer params.

get-current-value

macro

(get-current-value f params entity-name)
Use the function `f` and these `params` to fetch an `entity` record from the database.

get-menu-options

macro

(get-menu-options entity-name get-q list-q fk value)
Fetch options for a menu of `entity-name` from the database, using this
`get-q` query and this `list-q` query, using the key `fk`, where the current
value is this `value`.

prepare-insertion-params

macro

(prepare-insertion-params params fields)
Params for insertion into the database must have keys for all fields in the
insert query, even if the value of some of those keys is nil. Massage these
`params` to have a value for each field in these `fields`.

property-defaults

(property-defaults entity)
Get a map of property names and default values for all properties of this
`entity` which have explicit defaults.

query-name

(query-name entity-or-name q-type)
Generate a query name for the query of type `q-type` (expected to be one
of `:create`, `:delete`, `:get`, `:list`, `:search-strings`, `:update`) of
the entity `entity-or-name` NOTE: if `entity-or-name` is passed as a string,
it should be the full, unaltered name of the entity.