datastore.query

Module Contents

Classes

BaseQuery

Query

GQLQuery

GQLCursor

QueryResultBatch

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

Return repr(self).

Return type:

str

abstract classmethod from_repr(data)
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'
__eq__(other)

Return self==value.

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'
__eq__(other)

Return self==value.

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) –

__eq__(other)

Return self==value.

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
__eq__(other)

Return self==value.

Parameters:

other (Any) –

Return type:

bool

__repr__()

Return repr(self).

Return type:

str

classmethod from_repr(data)
Parameters:

data (Dict[str, Any]) –

Return type:

QueryResultBatch

to_repr()
Return type:

Dict[str, Any]