pygridgain.queries package¶
Submodules¶
pygridgain.queries.op_codes module¶
Named constants that represents request operation codes. These are the way of telling GridGain server what one want to do in their request.
pygridgain.queries.query module¶
-
class
pygridgain.queries.query.
ConfigQuery
(op_code: int, following: list = NOTHING, query_id: int = None)¶ Bases:
pygridgain.queries.query.Query
This is a special query, used for creating caches with configuration.
-
classmethod
build_c_type
()¶
-
from_python
(values: dict = None)¶
-
classmethod
-
class
pygridgain.queries.query.
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, sql: bool = False, **kwargs) → pygridgain.api.result.APIResult¶ Perform query and process result.
Parameters: - conn – connection to GridGain 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,
- sql – (optional) use normal (default) or SQL response class,
Returns: instance of
APIResult
with raw value (may undergo further processing in API functions).
-
-
pygridgain.queries.query.
get_response_class
(obj: object, sql: bool = False)¶ Response class factory.
Parameters: - obj – cache, connection or client object,
- sql – (optional) return normal (default) or SQL response class,
Returns: response class.
pygridgain.queries.response module¶
-
pygridgain.queries.response.
Response120
¶
-
class
pygridgain.queries.response.
Response130
(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
pygridgain.queries.response.
Response140
(following: list = NOTHING)¶ Bases:
object
-
__init__
(following: list = NOTHING) → None¶ Initialize self. See help(type(self)) for accurate signature.
-
classmethod
build_header
()¶
-
parse
(conn: Connection)¶
-
to_python
(ctype_object, *args, **kwargs)¶
-
-
pygridgain.queries.response.
SQLResponse120
¶
-
class
pygridgain.queries.response.
SQLResponse130
(following: list = NOTHING, include_field_names: bool = False, has_cursor: bool = False)¶ Bases:
pygridgain.queries.response.Response130
The response class of SQL functions is special in the way the row-column data is counted in it. Basically, GridGain 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)¶
-
-
class
pygridgain.queries.response.
SQLResponse140
(following: list = NOTHING, include_field_names: bool = False, has_cursor: bool = False)¶ Bases:
pygridgain.queries.response.Response140
The response class of SQL functions is special in the way the row-column data is counted in it. Basically, GridGain 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
(conn: Connection)¶
-
to_python
(ctype_object, *args, **kwargs)¶
-
Module contents¶
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 pygridgain.api
module. They, in turn, based on
pygridgain.datatypes
binary parser/generator classes.