Struct PointSelector
What an operation targets: a backup point (the newest one, or one by its id), or — for a restore only — an LSN or an instant of an archived WAL timeline (#1418), which restores the newest point at or below it and replays the archive up to it.
public readonly struct PointSelector : IEquatable<PointSelector>
- Implements
- Inherited Members
Remarks
Verify, list and the other point-scoped operations take a point and throw ArgumentException for an archive target: an LSN names no pack.
Properties
BackupId
The selected id; 0 for Latest and for an archive target.
public uint BackupId { get; }
Property Value
IsArchiveTarget
Whether this targets the WAL archive (AtLsn(long, Guid?), AtTime(DateTime, Guid?)) rather than a point.
public bool IsArchiveTarget { get; }
Property Value
IsLatest
Whether this selects the newest point.
public bool IsLatest { get; }
Property Value
IsTimeTarget
Whether this is an AtTime(DateTime, Guid?) target.
public bool IsTimeTarget { get; }
Property Value
Latest
The point with the highest id in the store.
public static PointSelector Latest { get; }
Property Value
Lsn
The target LSN of AtLsn(long, Guid?); 0 otherwise.
public long Lsn { get; }
Property Value
TimeUtc
The target instant of AtTime(DateTime, Guid?); MinValue otherwise.
public DateTime TimeUtc { get; }
Property Value
TimelineId
The WAL timeline of an archive target; null = the newest.
public Guid? TimelineId { get; }
Property Value
- Guid?
Methods
AtLsn(long, Guid?)
The archived WAL up to lsn: the restore ends at the last frame (a transaction, or one fence emission) ending at or below it.
public static PointSelector AtLsn(long lsn, Guid? timeline = null)
Parameters
lsnlongThe target LSN (1 or more).
timelineGuid?The WAL timeline;
null= the newest one, walking back to the ancestor that holdslsn.
Returns
AtTime(DateTime, Guid?)
The archived WAL as it was durable at utc, to the archive's time-sample resolution: no transaction durable after it is
included, and one durable up to a sample interval before it may be left out.
public static PointSelector AtTime(DateTime utc, Guid? timeline = null)
Parameters
utcDateTimetimelineGuid?The WAL timeline;
null= the newest one, walking back to the ancestor that holds the instant.
Returns
ById(uint)
The point whose id is backupId.
public static PointSelector ById(uint backupId)
Parameters
backupIduintA point id (1 or more).
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
Equals(PointSelector)
public bool Equals(PointSelector other)
Parameters
otherPointSelector
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()