Liking cljdoc? Tell your friends :D

everest.pg.handler.middleware


wrap-connectionclj

(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 pool
  • connection-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.
raw docstring

wrap-json-stateclj

(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 stored
  • json-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`
raw docstring

wrap-positionclj

(wrap-position handler
               {:handler.middleware/keys [handler-type handler-id] :as opts})

wrap-stateclj

(wrap-state handler
            {:handler.middleware/keys [handler-type handler-id] :as opts})

wrap-txclj

(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.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close