KeySelector

Namespace: FoundationDB.Client · struct

Implements: IEquatable<KeySelector>, ISpanFormattable, IFormattable

Defines a selector for a key in the database

Constructors

KeySelector

KeySelector(Slice key, bool orEqual, int offset)

Creates a new selector

Methods

Deconstruct

void Deconstruct(out Slice 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(KeySelector other)

bool Equals(object obj)

FirstGreaterOrEqual

static KeySelector FirstGreaterOrEqual(Slice key)

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

FirstGreaterThan

static KeySelector FirstGreaterThan(Slice key)

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

GetHashCode

int GetHashCode()

LastLessOrEqual

static KeySelector LastLessOrEqual(Slice key)

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

LastLessThan

static KeySelector LastLessThan(Slice 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

ToSpan

KeySpanSelector ToSpan()

Returns the equivalent KeySpanSelector

ToString

string ToString()

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

string ToString(string format, IFormatProvider formatProvider = null)

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

TryFormat

bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider formatProvider = null)

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

Fields

Key

readonly Slice 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.