This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Can someone explain how to use as-of
and since
bounds on the history
function? per this doc (particularly the * delimited part):
history
function
Usage: (history db)
Returns a special database containing all assertions and
retractions across time. This special database can be used for
datoms and index-range calls and queries, but not for entity or
with calls. ***as-of and since bounds are also supported.*** Note that
queries will get all of the additions and retractions, which can be
distinguished by the fifth datom field :added (true for add/assert)
[e a v tx added]
I would expect a query containing the following three clauses to return exactly one (or none) results. Yet I'm seeing a bunch of them (with different values for ?max-time):
[?a :quote/time ?time]
[(max ?time) ?max-time]
[(= ?time ?max-time)]
[these are time values within the data; not relying on datomic's own sense of time]
what i need is to do a "function expression" binding at the :find
level rather than within the :where
clauses