adl.to-hugsql-queries

Application Description Language - generate HUGSQL queries file.

delete-query

(delete-query entity)

Generate an appropriate delete query for this entity

expanded-token

*TODO: write docs

foreign-queries

(foreign-queries entity application)

Generate any foreign entity queries for this entity of this application.

generate-documentation

(generate-documentation query)

Generate, as a string, appropriate documentation for a function wrapping this query map.

insert-query

(insert-query entity)

Generate an appropriate insert query for this entity. TODO: this depends on the idea that system-unique properties are not insertable, which is… dodgy.

list-query

(list-query entity)

Generate a query to list records in the table represented by this entity. Parameters :limit and :offset may be supplied. If not present limit defaults to 100 and offset to 0.

order-by-clause

(order-by-clause entity)(order-by-clause entity prefix)(order-by-clause entity prefix expanded?)

Generate an appropriate order by clause for queries on this entity

queries

(queries application entity)(queries application)

Generate all standard queries for this entity in this application; if no entity is specified, generate all queries for the application.

search-query

(search-query entity _)(search-query entity)

Generate an appropriate search query for string fields of this entity.

Unused second argument was application, and is retained for backward compatibility.

select-query

(select-query entity properties)(select-query entity)

Generate an appropriate select query for this entity

to-hugsql-queries

(to-hugsql-queries application)

Generate all HugSQL queries implied by this ADL application spec.

update-query

(update-query entity)

Generate an appropriate update query for this entity

where-clause

(where-clause entity)(where-clause entity properties)

Generate an appropriate where clause for queries on this entity; if properties are passed, filter on those properties, otherwise the key properties.