rethinkdb

adrien 2016-08-23T20:01:42.000401Z

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

adrien 2016-08-23T20:03:18.000402Z

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

adrien 2016-08-23T20:03:40.000403Z

probably obvious, but I don't get it 😕

adrien 2016-08-23T20:04:14.000404Z

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))))))

adrien 2016-08-23T20:05:01.000405Z

any idea?