Restores an index value to the correct datastore type.
View aliases
Main aliases
`google.appengine.api.datastore.datastore_types.RestoreFromIndexValue`
google.appengine.api.datastore_types.RestoreFromIndexValue(
index_value, data_type
)
Projection queries return property values directly from a datastore index.
These values are the native datastore values that can be one of the following:
str
, bool
, long
, float
, GeoPt
, Key
, or User
. This function
restores the original value when the original type is known.
This function returns the value type returned when decoding a normal entity,
not necessarily of type data_type
. For example, data_type=int
returns a
long
instance.
Args |
index_value
|
The value returned by FromPropertyPb for the projected
property.
|
data_type
|
The type of the value originally given to ToPropertyPb .
|
Returns |
The restored property value.
|