Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make history, as-of and since composable #682

Open
jonasseglare opened this issue Jun 5, 2024 · 0 comments · May be fixed by #683
Open

Make history, as-of and since composable #682

jonasseglare opened this issue Jun 5, 2024 · 0 comments · May be fixed by #683
Labels
enhancement New feature or request

Comments

@jonasseglare
Copy link
Collaborator

jonasseglare commented Jun 5, 2024

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).

@jonasseglare jonasseglare added the enhancement New feature or request label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant