Workiva / eva

A distributed database-system implementing an entity-attribute-value data-model that is time-aware, accumulative, and atomically consistent
Other
565 stars 25 forks source link

Refine contract for exceptions thrown from mistyped reads #94

Open tylerwilding-wk opened 5 years ago

tylerwilding-wk commented 5 years ago

Reading a mismatched type from the indexes can throw the following exception:

eva.query.query-test> (eva.api/datoms (eva.api/db conn) :eavt 0 :db/doc :not-a-string)
ClassCastException java.lang.String cannot be cast to clojure.lang.Keyword  clojure.lang.Keyword.compareTo (Keyword.java:114)

We should probably replace this with an actual exception, and consider special casing tempids being passed in.