(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 assoc
ed 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 :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 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 is a website building & hosting documentation for Clojure/Script libraries
× close