RowRange(
start_key: typing.Optional[typing.Union[str, bytes]] = None,
end_key: typing.Optional[typing.Union[str, bytes]] = None,
start_is_inclusive: typing.Optional[bool] = None,
end_is_inclusive: typing.Optional[bool] = None,
)
Represents a range of keys in a ReadRowsQuery
Properties
end_is_inclusive
Indicates if the range is inclusive of the end key.
If the range is unbounded on the right, this will return True.
Returns | |
---|---|
Type | Description |
bool |
Whether the range is inclusive of the end key. |
end_key
Returns the end key of the range. If None, the range is unbounded on the right.
Returns | |
---|---|
Type | Description |
bytes None |
The end key of the range, or None if the range is unbounded on the right. |
start_is_inclusive
Indicates if the range is inclusive of the start key.
If the range is unbounded on the left, this will return True.
Returns | |
---|---|
Type | Description |
bool |
Whether the range is inclusive of the start key. |
start_key
Returns the start key of the range. If None, the range is unbounded on the left.
Methods
__bool__
__bool__() -> bool
Empty RowRanges (representing a full table scan) are falsy, because they can be substituted with None. Non-empty RowRanges are truthy.
Returns | |
---|---|
Type | Description |
bool |
True if the RowRange is not empty, False otherwise |
__str__
__str__() -> str
Represent range as a string, e.g. "[b'a', b'z)"
Unbounded start or end keys are represented as "-inf" or "+inf"
Returns | |
---|---|
Type | Description |
str |
The string representation of the range |