KeyRange class abstract

represents a continuous interval over some data type that is used for keys.

Records can be retrieved from ObjectStore and Index objects using keys or a range of keys. You can limit the range using lower and upper bounds. For example, you can iterate over all values of a key in the value range A–Z.

A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included)

Constructors

KeyRange()
Should not be used.
factory
KeyRange.bound(Object lowerBound, Object upperBound, [bool lowerOpen = false, bool upperOpen = false])
Creates a new key range with upper and lower bounds.
factory
KeyRange.lowerBound(Object lowerBound, [bool open = false])
Creates a new key range with only a lower bound, open false means included.
factory
KeyRange.only(Object value)
Creates a new key range containing a single value.
factory
KeyRange.upperBound(Object upperBound, [bool open = false])
Creates a new upper-bound key range.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
lower → Object?
Lower bound of the key range.
no setter
lowerOpen → bool
Returns false if the lower-bound value is included in the key range.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
upper → Object?
Upper bound of the key range.
no setter
upperOpen → bool
Returns false if the upper-bound value is included in the key range.
no setter

Methods

contains(Object key) → bool
Return true if a key range contains a given key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited