datastore.query

Classes

BaseQuery

Query

GQLQuery

GQLCursor

QueryResultBatch

Module Contents

class datastore.query.BaseQuery
json_key: str
value_kind
__repr__()
Return type:

str

classmethod from_repr(data)
Abstractmethod:

Parameters:

data (Dict[str, Any])

Return type:

BaseQuery

abstract to_repr()
Return type:

Dict[str, Any]

class datastore.query.Query(kind='', query_filter=None, order=None, start_cursor='', end_cursor='', offset=None, limit=None, projection=None, distinct_on=None)

Bases: BaseQuery

Parameters:
json_key = 'query'
kind = ''
query_filter = None
orders = []
start_cursor = ''
end_cursor = ''
offset = None
limit = None
projection = []
distinct_on = []
__eq__(other)
Parameters:

other (Any)

Return type:

bool

classmethod from_repr(data)
Parameters:

data (Dict[str, Any])

Return type:

Query

to_repr()
Return type:

Dict[str, Any]

class datastore.query.GQLQuery(query_string, allow_literals=True, named_bindings=None, positional_bindings=None)

Bases: BaseQuery

Parameters:
  • query_string (str)

  • allow_literals (bool)

  • named_bindings (Optional[Dict[str, Any]])

  • positional_bindings (Optional[List[Any]])

json_key = 'gqlQuery'
query_string
allow_literals = True
named_bindings
positional_bindings = []
__eq__(other)
Parameters:

other (Any)

Return type:

bool

classmethod from_repr(data)
Parameters:

data (Dict[str, Any])

Return type:

GQLQuery

classmethod _param_from_repr(param_repr)
Parameters:

param_repr (Dict[str, Any])

Return type:

Any

to_repr()
Return type:

Dict[str, Any]

_param_to_repr(param)
Parameters:

param (Any)

Return type:

Dict[str, Any]

class datastore.query.GQLCursor(value)
Parameters:

value (str)

value
__eq__(other)
Parameters:

other (Any)

Return type:

bool

class datastore.query.QueryResultBatch(end_cursor, entity_result_type=ResultType.UNSPECIFIED, entity_results=None, more_results=MoreResultsType.UNSPECIFIED, skipped_cursor='', skipped_results=0, snapshot_version='')
Parameters:
entity_result_kind
end_cursor
entity_result_type
entity_results = []
more_results
skipped_cursor = ''
skipped_results = 0
snapshot_version = ''
__eq__(other)
Parameters:

other (Any)

Return type:

bool

__repr__()
Return type:

str

classmethod from_repr(data)
Parameters:

data (Dict[str, Any])

Return type:

QueryResultBatch

to_repr()
Return type:

Dict[str, Any]