Clarify persistence extension documentation for .lastUpdate (#1941)

Signed-off-by: Jan N. Klug <github@klug.nrw>

Signed-off-by: Jan N. Klug <github@klug.nrw>
pull/1943/head
J-N-K 2022-12-04 14:02:09 +01:00 committed by GitHub
parent 14422a8a6b
commit 7da8861566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 26 deletions

View File

@ -148,33 +148,33 @@ You can easily imagine that you can implement very powerful rules using this fea
Here is the full list of available persistence extensions:
| Persistence Extension | Description |
|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `<item>.persist` | Persists the current State of the Item |
| `<item>.lastUpdate` | Queries for the last update timestamp of a given Item |
| `<item>.historicState(ZonedDateTime)` | Retrieves the State of an Item at a certain point in time (returns HistoricItem) |
| `<item>.changedSince(ZonedDateTime)` | Checks if the State of the Item has (ever) changed since a certain point in time |
| `<item>.changedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the State of the Item has (ever) changed between certain points in time |
| `<item>.updatedSince(ZonedDateTime)` | Checks if the state of the Item has been updated since a certain point in time |
| `<item>.updatedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the state of the Item has been updated between certain points in time |
| `<item>.maximumSince(ZonedDateTime)` | Gets the maximum value of the State of a persisted Item since a certain point in time (returns HistoricItem) |
| `<item>.maximumBetween(ZonedDateTime ZonedDateTime)` | Gets the maximum value of the State of a persisted Item between certain points in time (returns HistoricItem) |
| `<item>.minimumSince(ZonedDateTime)` | Gets the minimum value of the State of a persisted Item since a certain point in time (returns HistoricItem) |
| `<item>.minimumBetween(ZonedDateTime, ZonedDateTime)` | Gets the minimum value of the State of a persisted Item between certain points in time (returns HistoricItem) |
| `<item>.averageSince(ZonedDateTime)` | Gets the average value of the State of a persisted Item since a certain point in time. This method uses a time-weighted average calculation (see example below) |
| Persistence Extension | Description |
|---------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `<item>.persist` | Persists the current State of the Item |
| `<item>.lastUpdate` | Returns the last timestamp a given Item was persisted |
| `<item>.historicState(ZonedDateTime)` | Retrieves the State of an Item at a certain point in time (returns HistoricItem) |
| `<item>.changedSince(ZonedDateTime)` | Checks if the State of the Item has (ever) changed since a certain point in time |
| `<item>.changedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the State of the Item has (ever) changed between certain points in time |
| `<item>.updatedSince(ZonedDateTime)` | Checks if the state of the Item has been updated since a certain point in time |
| `<item>.updatedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the state of the Item has been updated between certain points in time |
| `<item>.maximumSince(ZonedDateTime)` | Gets the maximum value of the State of a persisted Item since a certain point in time (returns HistoricItem) |
| `<item>.maximumBetween(ZonedDateTime ZonedDateTime)` | Gets the maximum value of the State of a persisted Item between certain points in time (returns HistoricItem) |
| `<item>.minimumSince(ZonedDateTime)` | Gets the minimum value of the State of a persisted Item since a certain point in time (returns HistoricItem) |
| `<item>.minimumBetween(ZonedDateTime, ZonedDateTime)` | Gets the minimum value of the State of a persisted Item between certain points in time (returns HistoricItem) |
| `<item>.averageSince(ZonedDateTime)` | Gets the average value of the State of a persisted Item since a certain point in time. This method uses a time-weighted average calculation (see example below) |
| `<item>.averageBetween(ZonedDateTime, ZonedDateTime)` | Gets the average value of the State of a persisted Item betwen certain points in time. This method uses a time-weighted average calculation (see example below) |
| `<item>.deltaSince(ZonedDateTime)` | Gets the difference in value of the State of a given Item since a certain point in time |
| `<item>.deltaBetween(ZonedDateTime, ZonedDateTime)` | Gets the difference in value of the State of a given Item between certain points in time |
| `<item>.evolutionRate(ZonedDateTime)` | Gets the evolution rate of the state of a given Item since a certain point in time (returns DecimalType) |
| `<item>.evolutionRate(ZonedDateTime, ZonedDateTime)` | Gets the evolution rate of the state of a given Item between certain points in time (returns DecimalType) |
| `<item>.deviationSince(ZonedDateTime)` | Gets the standard deviation of the state of the given Item since a certain point in time (returns DecimalType) |
| `<item>.deviationBetween(ZonedDateTime, ZonedDateTime)` | Gets the standard deviation of the state of the given Item between certain points in time (returns DecimalType) |
| `<item>.varianceSince(ZonedDateTime)` | Gets the variance of the state of the given Item since a certain point in time (returns DecimalType) |
| `<item>.varianceBetween(ZonedDateTime, ZonedDateTime)` | Gets the variance of the state of the given Item between certain point sin time (returns DecimalType) |
| `<item>.previousState()` | Gets the previous State of a persisted Item (returns HistoricItem) |
| `<item>.previousState(true)` | Gets the previous State of a persisted Item, skips Items with equal State values and searches the first Item with State not equal the current State (returns HistoricItem) |
| `<item>.sumSince(ZonedDateTime)` | Gets the sum of the previous States of a persisted Item since a certain point in time |
| `<item>.sumBetween(ZonedDateTime, ZonedDateTime)` | Gets the sum of the previous States of a persisted Item between certain points in time |
| `<item>.deltaSince(ZonedDateTime)` | Gets the difference in value of the State of a given Item since a certain point in time |
| `<item>.deltaBetween(ZonedDateTime, ZonedDateTime)` | Gets the difference in value of the State of a given Item between certain points in time |
| `<item>.evolutionRate(ZonedDateTime)` | Gets the evolution rate of the state of a given Item since a certain point in time (returns DecimalType) |
| `<item>.evolutionRate(ZonedDateTime, ZonedDateTime)` | Gets the evolution rate of the state of a given Item between certain points in time (returns DecimalType) |
| `<item>.deviationSince(ZonedDateTime)` | Gets the standard deviation of the state of the given Item since a certain point in time (returns DecimalType) |
| `<item>.deviationBetween(ZonedDateTime, ZonedDateTime)` | Gets the standard deviation of the state of the given Item between certain points in time (returns DecimalType) |
| `<item>.varianceSince(ZonedDateTime)` | Gets the variance of the state of the given Item since a certain point in time (returns DecimalType) |
| `<item>.varianceBetween(ZonedDateTime, ZonedDateTime)` | Gets the variance of the state of the given Item between certain point sin time (returns DecimalType) |
| `<item>.previousState()` | Gets the previous State of a persisted Item (returns HistoricItem) |
| `<item>.previousState(true)` | Gets the previous State of a persisted Item, skips Items with equal State values and searches the first Item with State not equal the current State (returns HistoricItem) |
| `<item>.sumSince(ZonedDateTime)` | Gets the sum of the previous States of a persisted Item since a certain point in time |
| `<item>.sumBetween(ZonedDateTime, ZonedDateTime)` | Gets the sum of the previous States of a persisted Item between certain points in time |
These extensions use the [default persistence service](#default-persistence-service).
You may specify a different persistence service by appending a String as an optional additional parameter at the end of the extension.