Skip to content

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>

Represents PostgreSQL’s 32-bit transaction ID type, xid.

public PgTransactionId(uint Value)

Parameters:

Value — uint

The raw transaction ID.

Gets PostgreSQL’s bootstrap transaction ID.

public static PgTransactionId Bootstrap { get; }

Value: PgTransactionId

Gets the first ordinary transaction ID.

public static PgTransactionId FirstNormal { get; }

Value: PgTransactionId

Gets PostgreSQL’s frozen transaction ID.

public static PgTransactionId Frozen { get; }

Value: PgTransactionId

Gets PostgreSQL’s invalid transaction ID.

public static PgTransactionId Invalid { get; }

Value: PgTransactionId

Gets whether this is an ordinary transaction ID rather than a PostgreSQL special value.

public bool IsNormal { get; }

Value: bool

Gets whether the transaction ID is valid.

public bool IsValid { get; }

Value: bool

The raw transaction ID.

public uint Value { get; init; }

Value: uint

public void Deconstruct(out uint Value)

Parameters:

Value — uint

public bool Equals(PgTransactionId other)

Parameters:

other — PgTransactionId

Returns: bool

public override bool Equals(object obj)

Parameters:

obj — object

Returns: bool

public override int GetHashCode()

Returns: int

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.

Formats the raw transaction ID as an unsigned decimal number.

public override string ToString()

Returns: string

The PostgreSQL transaction ID text.

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