Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
query info for datomic
;;takes datomic query and turns it into map so it may be interrogated
(defn query-info [query]
(let [parts (partition-by keyword? query)
is-kw #(keyword? (first %))]
(map first (filter is-kw parts))
(remove is-kw parts))))
((query-info '[:find ?x ?y ?z :in $ ?d :where [?x :some/thing ?y] [?x :some/otherthing ?z]]) :find)
(?x ?y ?z)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment