pub async fn hint_version_from_timestamp(
trx: &Transaction,
unix_timestamp_as_seconds: u64,
mode: HintMode,
snapshot: bool,
) -> Result<Option<u64>, FdbBindingError>
Expand description
Try to get a version ID closer as possible as the asked timestamp
If no result are found, either your timestamp is in the future of the Timekeeper or the data has been rolled by fresh ones.
The layout os follow:
TIME_KEEPER_PREFIX/timestamp1 => read_version1 TIME_KEEPER_PREFIX/timestamp2 => read_version2 TIME_KEEPER_PREFIX/timestamp3 => read_version3
Each key are associated to a pack read version on 8 bytes compatible with an i64.
Timestamps are provided from unix time as seconds