Hi, It looks like datahike wants a long when, in the schema, the datum is declared :db.type/long. That makes sense, of course, but datahike doesn’t seem to coerce java.lang.Integer to java.lang.Long; the spec throws an error. Would it be possible/reasonable for datahike to coerce integers to long and maybe loosen up the spec to use integer? rather than int? ?
Yes, that makes sense. I'll create a protocol for the schema itself and I'll start a discussion on how to build the specs for the schema. Feel free to recommend best practices there.
Would it be possible to have a :db.type/number that generalizes float double and long?
Or maybe just double and long.
that would be possible
you would just create a clojure.spec for that in here: https://github.com/replikativ/datahike/blob/master/src/datahike/schema.cljc#L7
Thanks. I made a PR.