datahike
datahike copied to clipboard
Make history, as-of and since composable
Describe the feature you would like to request
Currently the following three queries all produce an error:
(d/q '[:find ?a :in $ ?e :where [?e :age ?a]]
(-> @conn d/history d/history)
[:name "Alice"])
(d/q '[:find ?a :in $ ?e :where [?e :age ?a]]
(-> @conn
(d/as-of tx-id0)
d/history)
[:name "Alice"])
(d/q '[:find ?a :in $ ?e :where [?e :age ?a]]
(-> @conn
d/history
(d/as-of tx-id0))
[:name "Alice"])
The error is the following:
error: java.lang.IllegalArgumentException: No implementation of method: :-slice of protocol: #'datahike.index.interface/IIndex found for class: nil
Describe the solution you would like
I would like to make queries against database expressions such as (-> @conn d/history d/history)
, (-> @conn (d/as-of tx-id0) d/history)
where we compose calls to d/history
, d/as-of
and d/since
.
Describe alternatives you've considered
Datomic, where this is possible (at least to some extent).