Skip to content

Instantly share code, notes, and snippets.


Caleb Macdonald Black CalebMacdonaldBlack

View GitHub Profile
CalebMacdonaldBlack / query_check.clj
Created Apr 11, 2018 — forked from maxweber/query_check.clj
Checks if a Datomic datalog query contains only allowed symbols / functions.
View query_check.clj
(require '[datomic.api :as d]
'[clojure.string :as str])
(defn normalize-query
"Turns a vector formatted Datomic datalog query into a map formatted
(let [pairs (partition-by keyword? query)]
(assert (even? (count pairs)))