The bounds can be open (that is, the bounds exclude the endpoint values) or closed (that is, the bounds include the endpoint values).
The bounds can be open (that is, the bounds exclude the endpoint values) or closed (that is, the bounds include the endpoint values). By default, the bounds are closed.
MDN
The lower bound of the key range (can be any type.)
The lower bound of the key range (can be any type.)
MDN
By default, it includes the lower endpoint value and is closed.
By default, it includes the lower endpoint value and is closed.
MDN
Returns false if the lower-bound value is included in the key range.
Returns false if the lower-bound value is included in the key range.
MDN
This method may raise a DOMException with a DOMError of the following types:
This method may raise a DOMException with a DOMError of the following types:
MDN
The upper bound of the key range (can be any type.)
The upper bound of the key range (can be any type.)
MDN
By default, it includes the upper endpoint value and is closed.
By default, it includes the upper endpoint value and is closed.
MDN
Returns false if the upper-bound value is included in the key range.
Returns false if the upper-bound value is included in the key range.
MDN
The IDBKeyRange interface of the IndexedDB API represents a continuous interval over some data type that is used for keys. Records can be retrieved from object stores and indexes 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 between x and y.
A key range can have 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). To retrieve all keys within a certain range, you can use the following code constructs:
MDN