(wrap-connection handler {:handler.middleware/keys [db connection-key]})Opens a connection using the provided db spec which might (and should) be
a connection pool, a JDBC URL or a connection description as specified in the
clojure.jdbc docs.
Accepts a:
db - dbspec or poolconnection-key - a key under which the connection will be assoced to
the event. None by default.Opens a connection using the provided `db` spec which might (and should) be
a connection pool, a JDBC URL or a connection description as specified in the
[clojure.jdbc](http://funcool.github.io/clojure.jdbc/latest/) docs.
Accepts a:
* `db` - dbspec or pool
* `connection-key` - a key under which the connection will be `assoc`ed to
the event. None by default.(wrap-json-state handler
{:handler.middleware/keys [state-key json-type]
:or {state-key :handler/state json-type :jsonb}})Wraps the result of the handler invocation so that it would be treated as a Json data type by the Postgres JDBC driver.
Accepts the following options:
state-key - :state by default, where the state is storedjson-type - :jsonb by default, either :json or :jsonbWraps the result of the handler invocation so that it would be treated as a Json data type by the Postgres JDBC driver. Accepts the following options: * `state-key` - `:state` by default, where the state is stored * `json-type` - `:jsonb` by default, either `:json` or `:jsonb`
(wrap-position handler
{:handler.middleware/keys [handler-type handler-id] :as opts})(wrap-state handler
{:handler.middleware/keys [handler-type handler-id] :as opts})(wrap-tx handler
{:handler.middleware/keys [tx-options tx-during-catch-up?]
:or {tx-options {} tx-during-catch-up? true}})Wraps the event handler into a transaction. Must be run inside the
wrap-connection handler.
Wraps the event handler into a transaction. Must be run inside the `wrap-connection` handler.
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 |