微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

revise RethinkDB 的 Clojure 客户端

程序名称:revise

授权协议: EPL

操作系统: 跨平台

开发语言: Java

revise 介绍

revise 是 RethinkDB
Clojure 客户端开发包。特点是:异步、无锁、高效以及易用。

示例代码

(require '[bitemyapp.revise.connection :refer [connect close]])
(require '[bitemyapp.revise.query :as r])
(require '[bitemyapp.revise.core :refer [run]])

;; connect returns the connection agent
(let [local-conn  (connect) ;; defaults to localhost
      ;; pass in connection options map to specify beyond the defaults
      remote-conn (connect {:host "99.99.99.1"
                            :port 28015
                            :auth-key ""})
      ;; running a query against a connection returns a promise, the API
      ;; and underlying implementation are asynchronous.
      response (-> (r/db "test") (r/table-create-db "authors") (run local-conn))]
  ;; dereference the promise to block on it.
  (println @response)
  ;; We are done using the connection
  (close local-conn))

revise 官网

https://github.com/bitemyapp/revise/

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐