Skip to content

PgCustomScanSortKey

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Names a column by which a custom scan path returns its rows in order.

public readonly struct PgCustomScanSortKey : IEquatable<PgCustomScanSortKey>

Values compare as the default B-tree operator class of the column’s type orders them, with the column’s collation, as ORDER BY on the column would. PostgreSQL trusts the order: rows out of order give wrong query results, as a corrupt index would.

Implements: IEquatable<PgCustomScanSortKey>

Initializes a key with PostgreSQL’s default NULL placement: last when ascending and first when descending.

public PgCustomScanSortKey(int ordinal, bool descending = false)

Parameters:

ordinal — int

The column’s zero-based position in Descriptor.

descending — bool

Whether larger values come first.

Names a column by which a custom scan path returns its rows in order.

public PgCustomScanSortKey(int Ordinal, bool Descending, bool NullsFirst)

Parameters:

Ordinal — int

The column’s zero-based position in Descriptor.

Descending — bool

Whether larger values come first.

NullsFirst — bool

Whether SQL NULL comes before every value.

Values compare as the default B-tree operator class of the column’s type orders them, with the column’s collation, as ORDER BY on the column would. PostgreSQL trusts the order: rows out of order give wrong query results, as a corrupt index would.

public void Deconstruct(out int Ordinal, out bool Descending, out bool NullsFirst)

Parameters:

Ordinal — int

Descending — bool

NullsFirst — bool

public bool Equals(PgCustomScanSortKey other)

Parameters:

other — PgCustomScanSortKey

Returns: bool

public override bool Equals(object obj)

Parameters:

obj — object

Returns: bool

public override int GetHashCode()

Returns: int

public override string ToString()

Returns: string

Whether larger values come first.

public bool Descending { get; init; }

Value: bool

Whether SQL NULL comes before every value.

public bool NullsFirst { get; init; }

Value: bool

The column’s zero-based position in Descriptor.

public int Ordinal { get; init; }

Value: int

operator ==(PgCustomScanSortKey, PgCustomScanSortKey)

Section titled “operator ==(PgCustomScanSortKey, PgCustomScanSortKey)”
public static bool operator ==(PgCustomScanSortKey left, PgCustomScanSortKey right)

Parameters:

left — PgCustomScanSortKey

right — PgCustomScanSortKey

Returns: bool

operator !=(PgCustomScanSortKey, PgCustomScanSortKey)

Section titled “operator !=(PgCustomScanSortKey, PgCustomScanSortKey)”
public static bool operator !=(PgCustomScanSortKey left, PgCustomScanSortKey right)

Parameters:

left — PgCustomScanSortKey

right — PgCustomScanSortKey

Returns: bool