Fork me on GitHub

while using a library that implements serialization, i found that query results (which appear to be PersistentVector) throw an .NotSerializableException: datomic.client.impl.shared.Db exception, where as a usual Clojure PersistentVector does not. calling vec on the results of a query solves the problem, but i'm wondering if there's a better way to solve this


I think that’s the right way. The result object, especially from the client sync apis, are a bit magical


many of them are lazily realized


if you use :keys in a query, that is a datatable-like object


even in the peer api this is true. queries may return ArrayList instead of vector for efficiency. d/datoms and friends return a reified thing that implements seq and iterable


so in general the apis only guarantee the interfaces and behavior of return values, not type