2015-02-23 86 views

回答

2

您要查詢找到與:db.install/attribute一切,你可以看到在this gist的例子還有datomic java examples回購GitHub上。

(require '[datomic.api :as d] 'clojure.pprint) 

;; You can run this with bin/run in the $DATOMIC_DIR 
(println "Printing database schema...") 
(def conn (d/connect (first *command-line-args*))) ;; call with db-uri as arg 

; Find and pretty-print each attribute in schema 
(let [db (d/db conn)] 
    (clojure.pprint/pprint 
    (map #(->> % first (d/entity db) d/touch) 
     (d/q '[:find ?v 
      :where [_ :db.install/attribute ?v]] 
     db)))) 

我從這裏要點轉載的例子

相關問題