C# Class Scalien.StringRangeParams

StringRangeParams is a convenient way to specify the string parameters for iteration when using Table.GetKeyIterator(StringRangeParams), Table.GetKeyValueIterator(StringRangeParams) and Table.Count(StringRangeParams).

The supported parameters are: prefix start key end key direction

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

The default values are empty strings and forward iteration.

Show file Open project: scalien/scaliendb Class Usage Examples

Public Methods

Method Description
Backward ( ) : StringRangeParams

Iteration will proceed backwards

Count ( uint count ) : StringRangeParams

Specify the count parameter for iteration

Iteration will stop after count elements.

EndKey ( string endKey ) : StringRangeParams

Specify the end key parameter for iteration

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

Granularity ( uint granularity ) : StringRangeParams

Specify the granularity parameter for iteration

Iteration will receive data in batches of granularity size.

Prefix ( string prefix ) : StringRangeParams

Specify the prefix parameter for iteration.

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

StartKey ( string startKey ) : StringRangeParams

Specify the start key parameter for iteration.

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

Private Methods

Method Description
ToByteRangeParams ( ) : ByteRangeParams

Method Details

Backward() public method

Iteration will proceed backwards
public Backward ( ) : StringRangeParams
return StringRangeParams

Count() public method

Specify the count parameter for iteration
Iteration will stop after count elements.
public Count ( uint count ) : StringRangeParams
count uint The count parameter.
return StringRangeParams

EndKey() public method

Specify the end key parameter for iteration
Iteration will stop at end key, or the first key greater than end key.
public EndKey ( string endKey ) : StringRangeParams
endKey string The end key parameter as a string.
return StringRangeParams

Granularity() public method

Specify the granularity parameter for iteration
Iteration will receive data in batches of granularity size.
public Granularity ( uint granularity ) : StringRangeParams
granularity uint The granularity parameter.
return StringRangeParams

Prefix() public method

Specify the prefix parameter for iteration.
Only keys starting with prefix will be returned by the iteration.
public Prefix ( string prefix ) : StringRangeParams
prefix string The prefix parameter as a string.
return StringRangeParams

StartKey() public method

Specify the start key parameter for iteration.
Iteration will start at start key, or the first key greater than start key.
public StartKey ( string startKey ) : StringRangeParams
startKey string The start key parameter as a string.
return StringRangeParams