KeySpanSelector

Namespace: FoundationDB.Client · struct

Implements: IEquatable<KeySpanSelector>, IFormattable

Defines a selector for a key in the database

Constructors

KeySpanSelector

KeySpanSelector(ReadOnlySpan<byte> key, bool orEqual, int offset)

Creates a new selector

Methods

Deconstruct

void Deconstruct(out ReadOnlySpan<byte> key, out bool orEqual, out int offset)

Deconstructs a key selector into its basic elements

  • keyKey field of the selector
  • orEqualOrEqual field of the selector
  • offsetOffset field of the selector

Equals

bool Equals(KeySpanSelector other)

FirstGreaterOrEqual

static KeySpanSelector FirstGreaterOrEqual(ReadOnlySpan<byte> key)

Creates a key selector that will select the first key that is greater than or equal to key

FirstGreaterThan

static KeySpanSelector FirstGreaterThan(ReadOnlySpan<byte> key)

Creates a key selector that will select the first key that is greater than key

GetHashCode

int GetHashCode()

LastLessOrEqual

static KeySpanSelector LastLessOrEqual(ReadOnlySpan<byte> key)

Creates a key selector that will select the last key that is less than or equal to key

LastLessThan

static KeySpanSelector LastLessThan(ReadOnlySpan<byte> key)

Creates a key selector that will select the last key that is less than key

Memoize

KeySelector Memoize()

Returns a version of this selector with the key allocated on the heap

PrettyPrint

string PrettyPrint(PrettyPrintMode mode)

Returns a displayable representation of the key selector

ToString

string ToString()

Converts the value of the current KeySpanSelector object into its equivalent string representation

string ToString(string format, IFormatProvider formatProvider)

Fields

Key

readonly ReadOnlySpan<byte> Key

Key of the selector

Offset

readonly int Offset

Offset of the selected key

OrEqual

readonly bool OrEqual

If true, the selected key can be equal to Key.