pyignite.datatypes.primitive_objects module¶
-
class
pyignite.datatypes.primitive_objects.
DataObject
¶ Bases:
pyignite.datatypes.null_object.Nullable
Base class for primitive data objects.
Primitive data objects are built of primitive data prepended by the corresponding type code.
-
classmethod
build_c_type
()¶
-
c_type
= None¶
-
classmethod
from_python_not_null
(stream, value, **kwargs)¶
-
classmethod
parse_not_null
(stream)¶
-
classmethod
to_python_not_null
(ctypes_object, *args, **kwargs)¶
-
type_code
= None¶
-
classmethod
-
class
pyignite.datatypes.primitive_objects.
ByteObject
¶ Bases:
pyignite.datatypes.primitive_objects.DataObject
-
c_type
¶ alias of
ctypes.c_byte
-
default
= 0¶
-
classmethod
hashcode
(value: int, *args, **kwargs) → int¶
-
pythonic
¶ alias of
builtins.int
-
type_code
= b'\x01'¶
-
-
class
pyignite.datatypes.primitive_objects.
ShortObject
¶ Bases:
pyignite.datatypes.primitive_objects.DataObject
-
c_type
¶ alias of
ctypes.c_short
-
default
= 0¶
-
classmethod
hashcode
(value: int, *args, **kwargs) → int¶
-
pythonic
¶ alias of
builtins.int
-
type_code
= b'\x02'¶
-
-
class
pyignite.datatypes.primitive_objects.
IntObject
¶ Bases:
pyignite.datatypes.primitive_objects.DataObject
-
c_type
¶ alias of
ctypes.c_int
-
default
= 0¶
-
classmethod
hashcode
(value: int, *args, **kwargs) → int¶
-
pythonic
¶ alias of
builtins.int
-
type_code
= b'\x03'¶
-
-
class
pyignite.datatypes.primitive_objects.
LongObject
¶ Bases:
pyignite.datatypes.primitive_objects.DataObject
-
c_type
¶ alias of
ctypes.c_long
-
default
= 0¶
-
classmethod
hashcode
(value: int, *args, **kwargs) → int¶
-
pythonic
¶ alias of
builtins.int
-
type_code
= b'\x04'¶
-
-
class
pyignite.datatypes.primitive_objects.
FloatObject
¶ Bases:
pyignite.datatypes.primitive_objects.DataObject
-
c_type
¶ alias of
ctypes.c_float
-
default
= 0.0¶
-
classmethod
hashcode
(value: float, *args, **kwargs) → int¶
-
pythonic
¶ alias of
builtins.float
-
type_code
= b'\x05'¶
-
-
class
pyignite.datatypes.primitive_objects.
DoubleObject
¶ Bases:
pyignite.datatypes.primitive_objects.DataObject
-
c_type
¶ alias of
ctypes.c_double
-
default
= 0.0¶
-
classmethod
hashcode
(value: float, *args, **kwargs) → int¶
-
pythonic
¶ alias of
builtins.float
-
type_code
= b'\x06'¶
-
-
class
pyignite.datatypes.primitive_objects.
CharObject
¶ Bases:
pyignite.datatypes.primitive_objects.DataObject
This type is a little tricky. It stores character values in UTF-16 Little-endian encoding. We have to encode/decode it to/from UTF-8 to keep the coding hassle to minimum. Bear in mind though: decoded character may take 1..4 bytes in UTF-8.
-
c_type
¶ alias of
ctypes.c_short
-
default
= ' '¶
-
classmethod
from_python_not_null
(stream, value, **kwargs)¶
-
classmethod
hashcode
(value: str, *args, **kwargs) → int¶
-
pythonic
¶ alias of
builtins.str
-
classmethod
to_python_not_null
(ctypes_object, *args, **kwargs)¶
-
type_code
= b'\x07'¶
-
-
class
pyignite.datatypes.primitive_objects.
BoolObject
¶ Bases:
pyignite.datatypes.primitive_objects.DataObject
-
c_type
¶ alias of
ctypes.c_byte
-
default
= False¶
-
classmethod
hashcode
(value: bool, *args, **kwargs) → int¶
-
pythonic
¶ alias of
builtins.bool
-
classmethod
to_python_not_null
(ctypes_object, *args, **kwargs)¶
-
type_code
= b'\x08'¶
-