datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
roninhacker 2020-10-16T16:29:30.026300Z

We're running with datomic on the backend and datascript on the front end. I'd like to just mirror datomic ids on the client side, but datascript uses longs for its ids, which means some datomic ids don't fit. Are there datomic settings that can constrain the id space? (if not I'll just write some transformation glue on the FE)

favila 2020-10-16T18:30:56.027300Z

Datomic also uses longs....

favila 2020-10-16T18:32:02.028700Z

Do you mean doubles? Are you worried about the 52 bit integer representation limit?

roninhacker 2020-10-16T22:24:28.029500Z

ah, yes, I guess it's not strictly datatype I'm worried about, but datascript's id limit of 2147483647

roninhacker 2020-10-16T22:26:04.029700Z

(which seems to be 2^31 -1 )

favila 2020-10-16T23:17:30.032900Z

D/tx->t will give you a 42 bit unique id per entity, which is extremely likely to be < 32 bits u less you have a huge number of entities or transactions. Maybe that’s useful info for some clever encoding scheme

roninhacker 2020-10-16T23:44:40.035600Z

hmmm, thank you