AsOf / Since


getAsOf(t) and getSince are complementary functions that either get us a snapshop of the database at some point in time or a current snapshot filtered with only changes after a point in time. Like before/after scenarios.


Temp test

Calling getAsOf(t) on a molecule gives us the data as of a certain point in time like t4:

As we saw in point in time, a t can be either a transaction entity id like tx4, a transaction number t4 or a java.util.Date like date4. So we could get to the same data in 3 different ways: === ... // Persons as of transaction entity id `tx4` (inclusive) === ... // Persons as of transaction value `t4` (inclusive) === ... // Persons as of some Date `date4` (inclusive) 

Note that t is “inclusive” meaning that it is how the database looked right after transaction tx4, t4 or date4.



As a complementary function to getAsOf(t) we have getSince(t) that gives us a snapshot of the current database filtered with only changes added after/since t:

In this case the t is not included === ... // Persons added since/after transaction entity id `tx4` (exclusive) === ... // Persons added since/after transaction value `t4` (exclusive) === ... // Persons added since/after some Date `date4` (exclusive)