Class FieldRange
Namespace: Oracle.NoSQL.SDK
Assembly: Oracle.NoSQL.SDK.dll
Syntax
public class FieldRange : Object
Remarks
This class defines a range of values to be used in a DeleteRange operation, as specified in FieldRange for that operation. It is used by DeleteRangeAsync and GetDeleteRangeAsyncEnumerable APIs.
FieldRange is used as the least significant component in a partially specified key value in order to create a value range for an operation that returns multiple rows or keys. The data types supported by FieldRange are limited to the atomic types which are valid for primary keys.
The least significant component of a key is the first component of the key that is not fully specified. For example, if the primary key for a table is defined as the tuple <a, b, c> a FieldRange can be specified for a if the primary key supplied is empty. A FieldRange can be specified for b if the primary key supplied to the operation has a concrete value for a but not for b or c.
This object is used to scope a DeleteRange operation. The field name specified must name a field in a table's primary key. The values used must be of the same type and that type must match the type of the field specified.
You may specify the FieldValue for lower bound, upper bound or both. Each bound may be either inclusive, meaning the range starts with (for lower bound) or ends with (for upper bound) with this value, or exclusive, meaning the range starts after (for lower bound) or ends before (for upper bound) this value. Properties StartsWith and EndsWith specify inclusive bounds. Properties StartsAfter and EndsBefore specify exclusive bounds. Note that for each end of the range you may specify either inclusive or exclusive bound, but not both.
Validation of the FieldValue object is performed when it is used in an operation. Validation includes verifying that the field is in the required key and, in the case of a composite key, that the field is in the proper order relative to the key used in the operation.
Examples
Instantiating FieldRange with TIMESTAMP value and only upper end of the range.var fieldRange = new FieldRange("deliveryDate")
{
EndsBefore = DateTime.UtcNow - TimeSpan.FromDays(10)
};
Constructors
Name | Description |
---|---|
FieldRange(String) | Initializes new instance of if FieldRange class. |
Properties
Name | Description |
---|---|
EndsBefore | Gets or sets the exclusive value for the upper bound of the field range. |
EndsWith | Gets or sets the inclusive value for the upper bound of the field range. |
EndValue | Gets the value for the upper bound of the field range. |
FieldName | Gets or sets the field name for the field range. |
IsEndInclusive | Gets the value indicating whether the upper bound of the field range is inclusive. |
IsStartInclusive | Gets the value indicating whether the lower bound of the field range is inclusive. |
StartsAfter | Gets or sets the exclusive value for the lower bound of the field range. |
StartsWith | Gets or sets the inclusive value for the lower bound of the field range. |
StartValue | Gets the value for the lower bound of the field range. |