FdbSubspaceKeyRange

Namespace: FoundationDB.Client · struct

Implements: IFdbKeyRange, ISpanFormattable, IFormattable

Range that matches all the keys inside a subspace

Constructors

FdbSubspaceKeyRange

FdbSubspaceKeyRange(IKeySubspace subspace, bool inclusive = false)

Methods

Contains

bool Contains(Slice key)

Tests if this range contains the given key

  • key — Key that is being tested

Returns: true if the key would be matched by this range.

bool Contains(ReadOnlySpan<byte> key)

Tests if this range contains the given key

  • key — Key that is being tested

Returns: true if the key would be matched by this range.

bool Contains<TKey>(in TKey key)

Tests if this range contains the given key

  • key — Key that is being tested

Returns: true if the key would be matched by this range.

Exclusive

FdbSubspaceKeyRange Exclusive()

Returns a version of this range that excludes the subspace prefix from the results

Inclusive

FdbSubspaceKeyRange Inclusive()

Returns a version of this range that includes the subspace prefix in the results

ToBeginKey

Slice ToBeginKey()

Returns the encoded "Begin" key of this range

ToBeginSelector

KeySelector ToBeginSelector()

Returns a KeySelector that will resolve the first key in the range (inclusive)

This can be passed as the "begin" selector to .

ToEndKey

Slice ToEndKey()

Returns the encoded "End" key of this range

ToEndSelector

KeySelector ToEndSelector()

Returns a KeySelector that will resolve the last key in the range (exclusive)

This can be passed as the "end" selector to .

ToKeyRange

KeyRange ToKeyRange()

Encode this range into a binary KeyRange

ToString

string ToString()

string ToString(string format, IFormatProvider formatProvider = null)

TryFormat

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

Fields

IsInclusive

readonly bool IsInclusive

If true, the subspace prefix is also included in the range

Subspace

readonly IKeySubspace Subspace

Subspace that contains the keys