pyignite.queries package

This module is a source of some basic information about the binary protocol.

Most importantly, it contains Query and Response base classes. They are used internally by pyignite.api module. They, in turn, based on pyignite.datatypes binary parser/generator classes.

class pyignite.queries.ConfigQuery(op_code: int, following: list = NOTHING, query_id: int = None)

Bases: pyignite.queries.Query

This is a special query, used for creating caches with configuration.

classmethod build_c_type()
from_python(values: dict = None)
class pyignite.queries.Query(op_code: int, following: list = NOTHING, query_id: int = None)

Bases: object

__init__(op_code: int, following: list = NOTHING, query_id: int = None) → None

Initialize self. See help(type(self)) for accurate signature.

classmethod build_c_type()
from_python(values: dict = None)
perform(conn: Connection, query_params: dict = None, response_config: list = None) → pyignite.api.result.APIResult

Perform query and process result.

Parameters:
  • conn – connection to Ignite server,
  • query_params – (optional) dict of named query parameters. Defaults to no parameters,
  • response_config – (optional) response configuration − list of (name, type_hint) tuples. Defaults to empty return value,
Returns:

instance of APIResult with raw value (may undergo further processing in API functions).

class pyignite.queries.Response(following: list = NOTHING)

Bases: object

__init__(following: list = NOTHING) → None

Initialize self. See help(type(self)) for accurate signature.

classmethod build_header()
parse(client: Client)
to_python(ctype_object, *args, **kwargs)
class pyignite.queries.SQLResponse(following: list = NOTHING, include_field_names: bool = False, has_cursor: bool = False)

Bases: pyignite.queries.Response

The response class of SQL functions is special in the way the row-column data is counted in it. Basically, Ignite thin client API is following a “counter right before the counted objects” rule in most of its parts. SQL ops are breaking this rule.

__init__(following: list = NOTHING, include_field_names: bool = False, has_cursor: bool = False) → None

Initialize self. See help(type(self)) for accurate signature.

fields_or_field_count()
parse(client: Client)
to_python(ctype_object, *args, **kwargs)