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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-09-30 UTC."],[[["This function, `RestoreFromIndexValue`, is designed to convert values from a datastore index back to their original datastore types."],["It is used when working with projection queries, which retrieve property values directly from an index, represented as `str`, `bool`, `long`, `float`, `GeoPt`, `Key`, or `User`."],["The function accepts the indexed value and the original data type as input to return the properly restored value."],["The restored value might not match the exact `data_type` specified, for instance, an input `data_type` of `int` may return `long`."],["The function can raise a `BadValueError` if it is unable to successfully restore the value to the correct type."]]],[]]