Bisql supports declaration comments inside SQL files.
These declarations are parsed and returned under :meta.
/*:name
<edn-or-text>
*/
Example:
/*:doc
Loads a user by id.
*/
/*:cardinality
:one
*/
SELECT *
FROM users
WHERE id = /*$id*/1
Rendered result:
{:sql "SELECT * FROM users WHERE id = ?"
:params [42]
:meta {:doc "Loads a user by id."
:cardinality :one}}
:doc also accepts plain text and is trimmed into a stringThis metadata is useful both in rendering output and in generated declaration namespaces.
See also:
Can you improve this documentation?Edit on GitHub
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 |