Command
The :command specifies the underlying database command to run for the given SQL. The built-in values are:
:queryor:?Query with a result-set (default):executeor:!Any statement:returning-executeor:<!Support forINSERT ... RETURNING:insertor:i!Support for insert and jdbc.getGeneratedKeys
:query and :execute mirror the distinction between query and execute! in the clojure.java.jdbc library and fetch and execute in the clojure.jdbc library.
For more information about :returning-execute and :insert, see Insert.
:query is the default command when no command is specified.
tip
To save some typing, the command can be specified as the second value for the :name key:
SQL
-- :name all-characters :?
You can create command functions of your own by implementing a hugsql.core/hugsql-command-fn multimethod.