View source on GitHub |
A range of values defined by its two extremes (inclusive or exclusive).
Inherits From: expected_type
google.appengine.datastore.datastore_stub_util.ValueRange()
Methods
Contains
Contains(
value
)
Check if the range contains a specific value.
Args | |
---|---|
value
|
the value to check. |
Returns | |
---|---|
True iff value is contained in this range. |
MapExtremes
MapExtremes(
mapper
)
Evaluate a function on the range extremes.
Args | |
---|---|
mapper
|
function to apply to the range extremes. |
Returns | |
---|---|
(x, y) where x = None if the range has no start, mapper(start, start_inclusive, False) otherwise y = None if the range has no end, mapper(end, end_inclusive, True) otherwise |
Remap
Remap(
mapper
)
Transforms the range extremes with a function.
The function mapper must preserve order, i.e. x rel_op y iff mapper(x) rel_op y
Args | |
---|---|
mapper
|
function to apply to the range extremes. |
Update
Update(
rel_op, limit
)
Filter the range by 'rel_op limit'.
Args | |
---|---|
rel_op
|
relational operator from datastore_pb.Query.Filter. |
limit
|
the value to limit the range by. |