C# Класс Scalien.ByteRangeParams

ByteRangeParams is a convenient way to specify the byte[] parameters for iteration when using Table.GetKeyIterator(ByteRangeParams), Table.GetKeyValueIterator(ByteRangeParams) and Table.Count(ByteRangeParams).

The supported parameters are: prefix start key end key count direction

ByteRangeParams is convenient because is uses chaining, so you can write expressions like new ByteRangeParams().Prefix(prefix).StartKey(startKey).EndKey(endKey).Count(count) and it returns the ByteRangeParam instance. Optionally call .Backward() to get a backward iterator.

The default values are empty byte arrays and forward iteration.

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Backward ( ) : ByteRangeParams

Iteration will proceed backwards

Count ( uint count ) : ByteRangeParams

Specify the count parameter for iteration

Iteration will stop after count elements.

EndKey ( byte endKey ) : ByteRangeParams

Specify the end key parameter for iteration

Iteration will stop at end key, or the first key greater than end key.

Granularity ( uint granularity ) : ByteRangeParams

Specify the granularity parameter for iteration

Iteration will receive data in batches of granularity size.

Prefix ( byte prefix ) : ByteRangeParams

Specify the prefix parameter for iteration.

Only keys starting with prefix will be returned by the iteration.

StartKey ( byte startKey ) : ByteRangeParams

Specify the start key parameter for iteration.

Iteration will start at start key, or the first key greater than start key.

Описание методов

Backward() публичный Метод

Iteration will proceed backwards
public Backward ( ) : ByteRangeParams
Результат ByteRangeParams

Count() публичный Метод

Specify the count parameter for iteration
Iteration will stop after count elements.
public Count ( uint count ) : ByteRangeParams
count uint The count parameter.
Результат ByteRangeParams

EndKey() публичный Метод

Specify the end key parameter for iteration
Iteration will stop at end key, or the first key greater than end key.
public EndKey ( byte endKey ) : ByteRangeParams
endKey byte The end key parameter as a byte[].
Результат ByteRangeParams

Granularity() публичный Метод

Specify the granularity parameter for iteration
Iteration will receive data in batches of granularity size.
public Granularity ( uint granularity ) : ByteRangeParams
granularity uint The granularity parameter.
Результат ByteRangeParams

Prefix() публичный Метод

Specify the prefix parameter for iteration.
Only keys starting with prefix will be returned by the iteration.
public Prefix ( byte prefix ) : ByteRangeParams
prefix byte The prefix parameter as a byte[].
Результат ByteRangeParams

StartKey() публичный Метод

Specify the start key parameter for iteration.
Iteration will start at start key, or the first key greater than start key.
public StartKey ( byte startKey ) : ByteRangeParams
startKey byte The start key parameter as a byte[].
Результат ByteRangeParams