FieldRange defines a range of values to be used in a deleteRange operation, as specified in opt.fieldRange for that operation.

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 fieldName 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) the value. Properties startWith and endWith specify inclusive bounds and properties startAfter and endBefore specify exclusive bounds. Note that for each end of the range you may specify either inclusive or exclusive bound, but not both.

Validation of this 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.

Hierarchy

  • FieldRange

Properties

endBefore?: KeyField

KeyField value for the upper bound of the range, exclusive. May be undefined if no upper bound is enforced. May not be used together with endWith.

endWith?: KeyField

Field value for the upper bound of the range, inclusive. May be undefined if no upper bound is enforced. May not be used together with endBefore.

fieldName: string

Field name for the range.

startAfter?: KeyField

Field value for the lower bound of the range, exclusive. May be undefined if no lower bound is enforced. May not be used together with startWith.

startWith?: KeyField

Field value for the lower bound of the range, inclusive. May be undefined if no lower bound is enforced. May not be used together with startAfter.

Generated using TypeDoc