PgTransactionId
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Represents PostgreSQL’s 32-bit transaction ID type, xid.
public readonly struct PgTransactionId : IEquatable<PgTransactionId>Implements: IEquatable<PgTransactionId>
Constructors
Section titled “Constructors”PgTransactionId(uint)
Section titled “PgTransactionId(uint)”Represents PostgreSQL’s 32-bit transaction ID type, xid.
public PgTransactionId(uint Value)Parameters:
Value — uint
The raw transaction ID.
Properties
Section titled “Properties”Bootstrap
Section titled “Bootstrap”Gets PostgreSQL’s bootstrap transaction ID.
public static PgTransactionId Bootstrap { get; }Value: PgTransactionId
FirstNormal
Section titled “FirstNormal”Gets the first ordinary transaction ID.
public static PgTransactionId FirstNormal { get; }Value: PgTransactionId
Frozen
Section titled “Frozen”Gets PostgreSQL’s frozen transaction ID.
public static PgTransactionId Frozen { get; }Value: PgTransactionId
Invalid
Section titled “Invalid”Gets PostgreSQL’s invalid transaction ID.
public static PgTransactionId Invalid { get; }Value: PgTransactionId
IsNormal
Section titled “IsNormal”Gets whether this is an ordinary transaction ID rather than a PostgreSQL special value.
public bool IsNormal { get; }Value: bool
IsValid
Section titled “IsValid”Gets whether the transaction ID is valid.
public bool IsValid { get; }Value: bool
The raw transaction ID.
public uint Value { get; init; }Value: uint
Methods
Section titled “Methods”Deconstruct(out uint)
Section titled “Deconstruct(out uint)”public void Deconstruct(out uint Value)Parameters:
Value — uint
Equals(PgTransactionId)
Section titled “Equals(PgTransactionId)”public bool Equals(PgTransactionId other)Parameters:
other — PgTransactionId
Returns: bool
Equals(object)
Section titled “Equals(object)”public override bool Equals(object obj)Parameters:
obj — object
Returns: bool
GetHashCode()
Section titled “GetHashCode()”public override int GetHashCode()Returns: int
ToFullTransactionId()
Section titled “ToFullTransactionId()”Expands this 32-bit transaction ID with the epoch nearest PostgreSQL’s next transaction ID.
public ulong ToFullTransactionId()Returns: ulong
The 64-bit transaction ID. Special transaction IDs are returned unchanged.
ToString()
Section titled “ToString()”Formats the raw transaction ID as an unsigned decimal number.
public override string ToString()Returns: string
The PostgreSQL transaction ID text.
Operators
Section titled “Operators”operator ==(PgTransactionId, PgTransactionId)
Section titled “operator ==(PgTransactionId, PgTransactionId)”public static bool operator ==(PgTransactionId left, PgTransactionId right)Parameters:
left — PgTransactionId
right — PgTransactionId
Returns: bool
operator !=(PgTransactionId, PgTransactionId)
Section titled “operator !=(PgTransactionId, PgTransactionId)”public static bool operator !=(PgTransactionId left, PgTransactionId right)Parameters:
left — PgTransactionId
right — PgTransactionId
Returns: bool