Support querying historical state #64

Open
opened 2020-08-06 16:54:18 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:54:18 +00:00 (Migrated from github.com)

datoms is effectively a roll-up of the transaction log: all assertions, in order, minus subsequent retractions.

It's sometimes useful to be able to query the history itself, either for testing or to answer questions like "was this ever asserted?" or "when was the earliest mention of X?".

We should:

  • Make the Context aware of its source(s).
  • Make pattern handling a function of source.

That is: a source that queries a range of the transaction log might take a simple pattern like

[?x :foo/bar ?y]

and produce

:from [[:transactions :t123]]
:where [[:= :t123.p (intern :foo/bar)] [:> t123.tx 456]]
`datoms` is effectively a roll-up of the transaction log: all assertions, in order, minus subsequent retractions. It's sometimes useful to be able to query the history itself, either for testing or to answer questions like "was this ever asserted?" or "when was the earliest mention of X?". We should: - Make the Context aware of its source(s). - Make pattern handling a function of source. That is: a source that queries a range of the transaction log might take a simple pattern like ``` [?x :foo/bar ?y] ``` and produce ``` :from [[:transactions :t123]] :where [[:= :t123.p (intern :foo/bar)] [:> t123.tx 456]] ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#64
No description provided.