Fork me on GitHub
#rethinkdb
<
2016-08-23
>
adrien20:08:42

hello, I don't understand how I should use the asynchronous requests in clj-rethinkdb

adrien20:08:18

when I run my query, it returns a channel then what should I do with this channel? I expect the result of the query, not the channel

adrien20:08:40

probably obvious, but I don't get it 😕

adrien20:08:14

example code:

(defn plot [id]
  (with-open [conn (r/connect :host url :port port :db db :async? true)]
    (go
      (<! (-> (r/table "plots")
              (r/get id)
              (r/run conn))))))