qbits.alia.async

execute-chan

(execute-chan session query {:keys [executor channel consistency serial-consistency routing-key retry-policy result-set-fn codec tracing? idempotent? row-generator fetch-size values timestamp paging-state read-timeout]})(execute-chan session query)

Same as execute, but returns a clojure.core.async/promise-chan that is wired to the underlying ResultSetFuture. This means this is usable with go blocks or take!. Exceptions are sent to the channel as a value, it’s your responsability to handle these how you deem appropriate.

For options refer to qbits.alia/execute doc

execute-chan-buffered

(execute-chan-buffered session query {:keys [executor consistency serial-consistency routing-key retry-policy result-set-fn row-generator codec tracing? idempotent? fetch-size values timestamp channel paging-state read-timeout]})(execute-chan-buffered session query)

Allows to execute a query and have rows returned in a clojure.core.async/chan. Every value in the chan is a single row. By default the query :fetch-size inherits from the cluster setting, unless you specify a different :fetch-size at query level and the channel is a regular clojure.core.async/chan, unless you pass your own :channel with its own sizing caracteristics. :fetch-size dicts the chunking of the rows returned, allowing to stream rows into the channel in a controlled manner. If you close the channel the streaming process ends. Exceptions are sent to the channel as a value, it’s your responsability to handle these how you deem appropriate. For options refer to qbits.alia/execute doc