(load path)Reads named HugCQL files (using HugSQL formatting) and returns a map of key (statement name) -> statement string / opts if defined.
Statements will be have values and identifiers automatically hyphen/underscore translated.
i.e. --:name foo/bar select :i:foo-bar from emp where id = :id
becomes
{:foo/bar "select foo_bar as "foo-bar" from emp where id = :id"}
Options can be provided in EDN format that are defaulted on statement execution
i.e. --:name foo/bar --:options {:fetch-size 500} select :i:foo-bar from emp where id = :id
becomes
{:foo/bar {:cql "select foo_bar as "foo-bar" from emp where id = :id" :opts {:fetch-size 500}}
See: https://www.hugsql.org/ https://www.hugsql.org/#param-value https://www.hugsql.org/#param-identifier
Note: The other more dynamic features of Hugsql are not supported here, list, tuples, snippets.
Reads named HugCQL files (using HugSQL formatting) and returns
a map of key (statement name) -> statement string / opts if defined.
Statements will be have values and identifiers automatically hyphen/underscore translated.
i.e.
--:name foo/bar
select :i:foo-bar from emp where id = :id
becomes
{:foo/bar "select foo_bar as \"foo-bar\" from emp where id = :id"}
Options can be provided in EDN format that are defaulted on statement execution
i.e.
--:name foo/bar
--:options {:fetch-size 500}
select :i:foo-bar from emp where id = :id
becomes
{:foo/bar {:cql "select foo_bar as \"foo-bar\" from emp where id = :id"
:opts {:fetch-size 500}}
See: https://www.hugsql.org/
https://www.hugsql.org/#param-value
https://www.hugsql.org/#param-identifier
Note: The other more dynamic features of Hugsql are not supported here, list, tuples, snippets.
(parse text)Same as load-prepared-statements but takes a string as an input rather than a file.
Same as load-prepared-statements but takes a string as an input rather than a file.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |