FdbRangeOptions

Namespace: FoundationDB.Client · class

Implements: IEquatable<FdbRangeOptions>

Container class for options in a Range query

Constructors

FdbRangeOptions

FdbRangeOptions()

Properties

Fetch

FdbFetchMode? Fetch { get; set; }

Read only the keys, only the values, or both (default)

IsReversed

bool IsReversed { get; set; }

If true, results are returned in reverse order (from last to first)

Limit

int? Limit { get; set; }

Maximum number of items to return

Pool

ArrayPool<byte> Pool { get; set; }

If specified, pool used to allocate the buffer that will hold the keys and values

If a pool is provided, then the FdbRangeChunk instance MUST be disposed, and the keys and values CANNOT be exposed outside the scope of the read operation.

Incorrect usage of pooled data may lead to data corruption and overall instability. Use with caution!

Streaming

FdbStreamingMode? Streaming { get; set; }

Streaming mode

TargetBytes

int? TargetBytes { get; set; }

Maximum number of bytes to read

The number is not exact, and a batch of result may overshoot this value by a small margin.

Methods

<Clone>$

FdbRangeOptions <Clone>$()

EnsureDefaults

static FdbRangeOptions EnsureDefaults(FdbRangeOptions options, FdbStreamingMode mode, FdbFetchMode fetch)

Add all missing values from the provided defaults

  • options — Options provided by the caller (can be null)
  • mode — Default value for Streaming if not provided
  • fetch — Default value for Fetch if not provided

Returns: Options with all the values filled

EnsureLegalValues

void EnsureLegalValues(int iteration)

Throws if values are not legal

Equals

bool Equals(object obj)

bool Equals(FdbRangeOptions other)

GetHashCode

int GetHashCode()

InReverse

FdbRangeOptions InReverse()

Returns the results in reverse order (starting from the end key)

OnlyKeys

FdbRangeOptions OnlyKeys()

Only read the keys, and discard the values

OnlyValues

FdbRangeOptions OnlyValues()

Only read the values, and discard the keys

ToString

string ToString()

WithLimit

FdbRangeOptions WithLimit(int limit)

Sets the maximum number of results to return

WithPool

FdbRangeOptions WithPool(ArrayPool<byte> pool)

Select an ArrayPool to allocate the keys and/or values in memory.

When using a pool, the caller MUST guarantee that the results are released to the pool; otherwise, the performances will be degraded.

Incorrect usage of pooled data may lead to data corruption and overall instability. Use with caution!

WithStreamingMode

FdbRangeOptions WithStreamingMode(FdbStreamingMode mode)

Sets the FdbStreamingMode for range read

WithTargetBytes

FdbRangeOptions WithTargetBytes(int targetBytes)

Sets a limit of bytes to read

Fields

Default

static readonly FdbRangeOptions Default

Default range options

First

static readonly FdbRangeOptions First

Read only the first result in the range

Options with set to

KeysOnly

static readonly FdbRangeOptions KeysOnly

Fetch only the keys

Options with set to

Last

static readonly FdbRangeOptions Last

Read only the last result in the range

Options with set to , and set to

Reversed

static readonly FdbRangeOptions Reversed

Read in reverse order

Options with set to

ValuesOnly

static readonly FdbRangeOptions ValuesOnly

Fetch only the values

Options with set to

WantAll

static readonly FdbRangeOptions WantAll

Will read all the keys and values in the range, without filtering

Options with set to

WantAllKeysOnly

static readonly FdbRangeOptions WantAllKeysOnly

Will read all the keys in the range, without filtering

Options with set to , and set to

WantAllReversed

static readonly FdbRangeOptions WantAllReversed

Will read all the keys and values in the range, in reverse order, without filtering

Options with set to , and set to

WantAllReversedKeysOnly

static readonly FdbRangeOptions WantAllReversedKeysOnly

Will read all the keys in the range, in reverse order, without filtering

Options with set to , set to , and set to

WantAllReversedValuesOnly

static readonly FdbRangeOptions WantAllReversedValuesOnly

Will read all the values in the range, in reverse order, without filtering

Options with set to , set to , and set to

WantAllValuesOnly

static readonly FdbRangeOptions WantAllValuesOnly

Will read all the values in the range, without filtering

Options with set to , and set to