is there a canonical way to grab all idents from a particular datomic namespace?

后端 未结 2 924
失恋的感觉
失恋的感觉 2021-01-13 14:23

say I had :user/name and :user/gender installed as datomic schema.

(pprint (d/q \'[:find ?ident :where
               [?e :db/ident         


        
2条回答
  •  耶瑟儿~
    2021-01-13 15:09

    I figured it out

    (d/q '[:find ?ident :where
               [?e :db/ident ?ident]
               [_ :db.install/attribute ?e]
               [(.toString ?ident) ?val]
               [(.startsWith ?val ":user")]] (d/db *conn*))
    
    ;; => #{[:user/gender] [:user/firstName]}
    

提交回复
热议问题