Expose datomish.schema/validate-schema so that schema management can use it.

This commit is contained in:
Richard Newman 2016-11-04 18:51:34 -07:00
parent 5fa26c58a8
commit bd0a56e501

View file

@ -178,7 +178,7 @@
(raise "Unknown attribute " attr ", expected one of " (sorted-set (keys schema))
{:error :schema/valueType, :attribute attr}))))
(defn- validate-schema [schema]
(defn validate-schema [schema]
(doseq [[a kv] schema]
(when-not (:db/valueType kv)
(throw (ex-info (str "Bad attribute specification for " a ": should have {:db/valueType ...}")