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.

    To convert a value to a key range with value and optional null disallowed flag, run these steps:

    1. If value is a , return value.

    2. Let key be the result of running convert a value to a key with value. Rethrow any exceptions.

    3. If key is invalid, a ““ .

    4. Return a key range key.