FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>

Namespace: FoundationDB.Client · struct

Implements: IFdbKey, ISpanEncodable, ISpanFormattable, IFormattable, IEquatable<FdbRawKey>, IComparable<FdbRawKey>, IEquatable<Slice>, IComparable<Slice>, IEquatable<IFdbKey>, IComparable, IEquatable<ReadOnlySpan<byte>>, IComparable<ReadOnlySpan<byte>>, IEquatable<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>>, IComparable<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>>, IEquatable<FdbTupleKey>, IComparable<FdbTupleKey>, IComparisonOperators<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, bool>, IEqualityOperators<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, bool>, IComparisonOperators<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, FdbTupleKey, bool>, IEqualityOperators<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, FdbTupleKey, bool>, IComparisonOperators<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, FdbRawKey, bool>, IEqualityOperators<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, FdbRawKey, bool>, IComparisonOperators<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, Slice, bool>, IEqualityOperators<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, Slice, bool>

Key that is composed of a 7-tuple inside a subspace

Remarks

Encoded as the subspace's prefix, following by the packed tuple items

Constructors

FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>

FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>(IKeySubspace subspace, in STuple<T1, T2, T3, T4, T5, T6, T7> items)

FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>(IKeySubspace subspace, T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)

Methods

CompareTo

int CompareTo(object obj)

int CompareTo(FdbTupleKey<T1, T2, T3, T4, T5, T6, T7> other)

int CompareTo(FdbTupleKey other)

int CompareTo(FdbRawKey other)

int CompareTo(Slice other)

int CompareTo(ReadOnlySpan<byte> other)

Contains

bool Contains(ReadOnlySpan<byte> key)

Tests if this key is a prefix of the given key

  • key — Key being tested

Returns: true if key starts with the same bytes as the current key; otherwise, false

The key foobar is contained inside foo because it starts with foo, but bar is NOT contained inside foo because it does not have the same prefix.

Any key contains "itself", so foo is contained inside foo

bool Contains<TOtherKey>(in TOtherKey key)

Tests if this key is a prefix of the given key

  • key — Key being tested

Returns: true if key starts with the same bytes as the current key; otherwise, false

The key foobar is contained inside foo because it starts with foo, but bar is NOT contained inside foo because it does not have the same prefix.

Any key contains "itself", so foo is contained inside foo

Equals

bool Equals(object other)

bool Equals(IFdbKey other)

bool Equals(FdbTupleKey<T1, T2, T3, T4, T5, T6, T7> other)

bool Equals(FdbTupleKey other)

bool Equals(FdbRawKey other)

bool Equals(Slice other)

bool Equals(ReadOnlySpan<byte> other)

FastCompareTo

int FastCompareTo<TOtherKey>(in TOtherKey other)

FastEqualTo

bool FastEqualTo<TOtherKey>(in TOtherKey other)

GetHashCode

int GetHashCode()

Key

FdbTupleKey<T1, T2, T3, T4, T5, T6, T7, T8> Key<T8>(T8 item8)

ToString

string ToString()

string ToString(string format, IFormatProvider formatProvider = null)

TryEncode

bool TryEncode(Span<byte> destination, out int bytesWritten)

Encodes this instance into its equivalent binary representation in the database

  • destination — Destination buffer
  • bytesWritten — Number of bytes written to the buffer

Returns: true if the operation was successful and the buffer was large enough, or false if it was too small

TryFormat

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

TryGetSizeHint

bool TryGetSizeHint(out int sizeHint)

Returns a quick estimate of the initial buffer size that would be large enough to encode this instance, in a single call to TryEncode

  • sizeHint — Receives an initial capacity that will satisfy almost all values. There is no guarantees that the size will be exact, and the estimate may be smaller or larger than the actual encoded size.

Returns: true if a size could be quickly computed; otherwise, false

TryGetSpan

bool TryGetSpan(out ReadOnlySpan<byte> span)

Returns the already encoded binary representation of the instance, if already available.

  • span — Points to the in-memory binary representation of the encoded key

Returns: true if the key has already been encoded, or it its in-memory layout is the same; otherwise, false

This is only intended to support pass-through or already encoded keys (via Slice), or when the binary representation has been cached to allow multiple uses.

Tuple

FdbTupleSuffixKey<FdbTupleKey<T1, T2, T3, T4, T5, T6, T7>, TTuple> Tuple<TTuple>(in TTuple items)

FdbTupleKey<T1, T2, T3, T4, T5, T6, T7, T8> Tuple<T8>(in STuple<T8> items)

FdbTupleKey<T1, T2, T3, T4, T5, T6, T7, T8> Tuple<T8>(in (T8) items)

Fields

Items

readonly STuple<T1, T2, T3, T4, T5, T6, T7> Items

Subspace

readonly IKeySubspace Subspace