pygridgain.datatypes.standard module¶
- class pygridgain.datatypes.standard.BinaryEnumArrayObject¶
Bases:
pygridgain.datatypes.standard.EnumArrayObject
- standard_type¶
- class pygridgain.datatypes.standard.BinaryEnumObject¶
Bases:
pygridgain.datatypes.standard.EnumObject
Another way of representing the enum type. Same, but different.
- type_code = b'&'¶
- class pygridgain.datatypes.standard.DateArray¶
Bases:
pygridgain.datatypes.standard.StandardArray
- standard_type¶
- class pygridgain.datatypes.standard.DateArrayObject¶
Bases:
pygridgain.datatypes.standard.StandardArrayObject
List of datetime.datetime type values.
- standard_type¶
- type_code = b'\x16'¶
- class pygridgain.datatypes.standard.DateObject¶
Bases:
pygridgain.datatypes.standard.StandardObject
A signed integer number of milliseconds past 1 Jan 1970, aka Epoch (8 bytes long integer).
Represented as a naive datetime.datetime in Python.
- classmethod build_c_type()¶
- default = datetime.datetime(1970, 1, 1, 0, 0)¶
- classmethod from_python_not_null(stream, value: Union[datetime.date, datetime.datetime], **kwargs)¶
- classmethod hashcode(value: datetime.datetime, **kwargs) int ¶
- pythonic¶
alias of
datetime.datetime
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- type_code = b'\x0b'¶
- class pygridgain.datatypes.standard.DecimalArray¶
Bases:
pygridgain.datatypes.standard.StandardArray
- standard_type¶
- class pygridgain.datatypes.standard.DecimalArrayObject¶
Bases:
pygridgain.datatypes.standard.StandardArrayObject
List of decimal.Decimal objects.
- standard_type¶
- type_code = b'\x1f'¶
- class pygridgain.datatypes.standard.DecimalObject¶
Bases:
pygridgain.datatypes.null_object.Nullable
- classmethod build_c_type(length)¶
- default = Decimal('0.00')¶
- classmethod from_python_not_null(stream, value: decimal.Decimal, **kwargs)¶
- classmethod hashcode(value: decimal.Decimal, **kwargs) int ¶
- classmethod parse_not_null(stream)¶
- pythonic¶
alias of
decimal.Decimal
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- type_code = b'\x1e'¶
- class pygridgain.datatypes.standard.EnumArray¶
Bases:
pygridgain.datatypes.standard.StandardArray
- standard_type¶
- class pygridgain.datatypes.standard.EnumArrayObject¶
Bases:
pygridgain.datatypes.standard.StandardArrayObject
Array of (int, int) tuples, plus it holds a type_id in its header. The only type_id value of -1 (user type) works from Python perspective.
- OBJECT = -1¶
- classmethod from_python_not_null(stream, value, **kwargs)¶
- standard_type¶
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- type_code = b'\x1d'¶
- class pygridgain.datatypes.standard.EnumObject¶
Bases:
pygridgain.datatypes.standard.StandardObject
Two integers used as the ID of the enumeration type, and its value.
This type itself is useless in Python, but can be used for interoperability (using language-specific type serialization is a good way to kill the interoperability though), so it represented by tuple(int, int) in Python.
- classmethod build_c_type()¶
- classmethod from_python_not_null(stream, value: tuple, **kwargs)¶
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- type_code = b'\x1c'¶
- class pygridgain.datatypes.standard.ObjectArray¶
Bases:
pygridgain.datatypes.standard.EnumArrayObject
- standard_type¶
- class pygridgain.datatypes.standard.String¶
Bases:
pygridgain.datatypes.null_object.Nullable
Pascal-style string: c_int counter, followed by count*bytes. UTF-8-encoded, so that one character may take 1 to 4 bytes.
- classmethod build_c_type(length: int)¶
- classmethod from_python_not_null(stream, value, **kwargs)¶
- classmethod hashcode(value: str, **kwargs) int ¶
- classmethod parse_not_null(stream)¶
- pythonic¶
alias of
str
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- type_code = b'\t'¶
- class pygridgain.datatypes.standard.StringArray¶
Bases:
pygridgain.datatypes.standard.StandardArray
Array of Pascal-like strings. Payload-only, i.e. no type_code field in binary representation.
List(str) in Python.
- standard_type¶
alias of
pygridgain.datatypes.standard.String
- class pygridgain.datatypes.standard.StringArrayObject¶
Bases:
pygridgain.datatypes.standard.StandardArrayObject
List of strings.
- standard_type¶
alias of
pygridgain.datatypes.standard.String
- type_code = b'\x14'¶
- class pygridgain.datatypes.standard.TimeArray¶
Bases:
pygridgain.datatypes.standard.StandardArray
- standard_type¶
- class pygridgain.datatypes.standard.TimeArrayObject¶
Bases:
pygridgain.datatypes.standard.StandardArrayObject
List of datetime.timedelta type values.
- standard_type¶
- type_code = b'%'¶
- class pygridgain.datatypes.standard.TimeObject¶
Bases:
pygridgain.datatypes.standard.StandardObject
Time of the day as a number of milliseconds since midnight.
Represented as a datetime.timedelta in Python.
- classmethod build_c_type()¶
- default = datetime.timedelta(0)¶
- classmethod from_python_not_null(stream, value: datetime.timedelta, **kwargs)¶
- classmethod hashcode(value: datetime.timedelta, **kwargs) int ¶
- pythonic¶
alias of
datetime.timedelta
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- type_code = b'$'¶
- class pygridgain.datatypes.standard.TimestampArray¶
Bases:
pygridgain.datatypes.standard.StandardArray
- standard_type¶
- class pygridgain.datatypes.standard.TimestampArrayObject¶
Bases:
pygridgain.datatypes.standard.StandardArrayObject
Translated into Python as a list of (datetime.datetime, integer) tuples.
- standard_type¶
- type_code = b'"'¶
- class pygridgain.datatypes.standard.TimestampObject¶
Bases:
pygridgain.datatypes.standard.StandardObject
A signed integer number of milliseconds past 1 Jan 1970, aka Epoch (8 bytes long integer), plus the delta in nanoseconds (4 byte integer, only 0..999 range used).
The accuracy is ridiculous. For instance, common HPETs have less than 10ms accuracy. Therefore no ns range calculations is made; epoch and fraction stored separately and represented as tuple(datetime.datetime, integer).
- classmethod build_c_type()¶
- default = (datetime.datetime(1970, 1, 1, 0, 0), 0)¶
- classmethod from_python_not_null(stream, value: tuple, **kwargs)¶
- classmethod hashcode(value: Tuple[datetime.datetime, int], **kwargs) int ¶
- pythonic¶
alias of
tuple
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- type_code = b'!'¶
- class pygridgain.datatypes.standard.UUIDArray¶
Bases:
pygridgain.datatypes.standard.StandardArray
- standard_type¶
- class pygridgain.datatypes.standard.UUIDArrayObject¶
Bases:
pygridgain.datatypes.standard.StandardArrayObject
Translated into Python as a list(uuid.UUID).
- standard_type¶
- type_code = b'\x15'¶
- class pygridgain.datatypes.standard.UUIDObject¶
Bases:
pygridgain.datatypes.standard.StandardObject
Universally unique identifier (UUID), aka Globally unique identifier (GUID). Payload takes up 16 bytes.
Byte order in
to_python()
andfrom_python()
methods is changed for compatibility with java.util.UUID.- UUID_BYTE_ORDER = (7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8)¶
- classmethod build_c_type()¶
- classmethod from_python_not_null(stream, value: uuid.UUID, **kwargs)¶
- classmethod hashcode(value: UUID, **kwargs) int ¶
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- type_code = b'\n'¶