A has an associated lower bound (null or a key).
A has an associated upper bound (null or a key).
A has an associated lower open flag. Unless otherwise stated it is false.
A key range has an associated upper open flag. Unless otherwise stated it is false.
A may have a lower bound its upper bound. A must not have a lower bound its upper bound.
A containing only key has both lower bound and equal to key.
The range’s lower bound is null, or it is key, or it is both equal to key and the range’s is false.
The range’s upper bound is null, or it is key, or it is both equal to key and the range’s is false.
If a key range‘s is false, the lower bound of the key range is included in the range itself.
If a ‘s upper open flag is false, the key of the is included in the range itself.
If a key range‘s is true, the upper bound of the key range is excluded from the range itself.
To convert a value to a key range with value and optional null disallowed flag, run these steps:
If value is a , return value.
Let key be the result of running convert a value to a key with value. Rethrow any exceptions.
If key is invalid, a ““ .
Return a key range key.