Python 3.9 is now generally available.

google.appengine.datastore.datastore_stub_util.StubQueryConverter

Converter for v3, v4 and v1 queries suitable for use in stubs.

Inherits From: expected_type

Methods

get_entity_converter

View source

v1_to_v3_compiled_cursor

View source

Converts a v1 cursor string to a v3 CompiledCursor.

Args
v1_cursor a string representing a v1 query cursor
v3_compiled_cursor a datastore_pb.CompiledCursor to populate

v1_to_v3_query

View source

Converts a v1 Query to a v3 Query.

Args
v1_partition_id a googledatastore.PartitionId
v1_query a googledatastore.Query
v3_query a datastore_pb.Query to populate

Raises
InvalidConversionError if the query cannot be converted

v3_order_to_v1_order

View source

Converts a v3 Query order to a v1 PropertyOrder.

Args
v3_order A datastore_pb.Query.Order.
v1_order A googledatastore.PropertyOrder to populate.

v3_order_to_v4_order

View source

Converts a v3 Query order to a v4 PropertyOrder.

Args
v3_order A datastore_pb.Query.Order.
v4_order A datastore_v4_pb2.PropertyOrder to populate.

v3_to_v1_compiled_cursor

View source

Converts a v3 CompiledCursor to a v1 cursor string.

Args
v3_compiled_cursor a datastore_pb.CompiledCursor

Returns
a string representing a v1 query cursor

v3_to_v1_query

View source

Converts a v3 Query to a v1 Query.

Args
v3_query a datastore_pb.Query
v1_query a googledatastore.Query to populate

Raises
InvalidConversionError if the query cannot be converted

v3_to_v4_compiled_cursor

View source

Converts a v3 CompiledCursor to a v4 cursor string.

Args
v3_compiled_cursor a datastore_pb.CompiledCursor

Returns
a string representing a v4 query cursor

v3_to_v4_query

View source

Converts a v3 Query to a v4 Query.

Args
v3_query a datastore_pb.Query
v4_query a datastore_v4_pb2.Query to populate

Raises
InvalidConversionError if the query cannot be converted

v4_to_v3_compiled_cursor

View source

Converts a v4 cursor string to a v3 CompiledCursor.

Args
v4_cursor a string representing a v4 query cursor
v3_compiled_cursor a datastore_pb.CompiledCursor to populate

v4_to_v3_query

View source

Converts a v4 Query to a v3 Query.

Args
v4_partition_id a datastore_v4_pb2.PartitionId
v4_query a datastore_v4_pb2.Query
v3_query a datastore_pb.Query to populate

Raises
InvalidConversionError if the query cannot be converted