:py:mod:`dissect.database.ese.record` ===================================== .. py:module:: dissect.database.ese.record Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.database.ese.record.Record dissect.database.ese.record.RecordData dissect.database.ese.record.TagField Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.database.ese.record.noop dissect.database.ese.record.serialise_record_column_values .. py:function:: noop(value: Any) -> Any .. py:class:: Record(table: dissect.database.ese.table.Table, node: dissect.database.ese.page.Node) Wrapper class for records in a table. The actual parsing of the data is done in :class:`RecordData`, but this class allows you to easily retrieve all the values by either using the `.get()` method, accessing them as attributes or dictionary keys on this class. :param table: The table this record is from. :param node: The node of this record. .. py:method:: __str__() -> str .. py:method:: __repr__() -> str .. py:method:: __hash__() -> int .. py:method:: __getitem__(attr: str) -> dissect.database.ese.util.RecordValue .. py:method:: __getattr__(attr: str) -> dissect.database.ese.util.RecordValue .. py:method:: __contains__(attr: str) -> bool .. py:method:: __eq__(value: object) -> bool .. py:method:: __ne__(value: object) -> bool .. py:method:: __lt__(value: object) -> bool .. py:method:: __le__(value: object) -> bool .. py:method:: __gt__(value: object) -> bool .. py:method:: __ge__(value: object) -> bool .. py:method:: get(attr: str, raw: bool = False) -> dissect.database.ese.util.RecordValue Retrieve a value from the record with the given name. Optionally receive the raw data as it's stored in the record. :param attr: The column name to retrieve the value of. :param raw: Whether to return the raw data stored in the record instead of the parsed value. .. py:method:: as_dict(raw: bool = False) -> dict[str, dissect.database.ese.util.RecordValue] .. py:class:: RecordData(table: dissect.database.ese.table.Table, node: dissect.database.ese.page.Node) Record class for parsing and interacting with the on-disk record format. Templated columns are currently not implemented. :param table: The table this record is from. :param data: The node data of this record. :raises NotImplementedError: If old format tagged fields are encountered. .. py:attribute:: table .. py:attribute:: db .. py:attribute:: node .. py:attribute:: data .. py:attribute:: header :value: None .. py:method:: get(column: dissect.database.ese.table.Column, raw: bool = False, errors: str | None = 'backslashreplace') -> dissect.database.ese.util.RecordValue Retrieve the value for the specified column. Optionally receive the raw data as it's stored in the record. If the database has been opened in impacket compatibility mode, skip most of the parsing and return the values that impacket expects. :param column: The column to retrieve the value of. :param raw: Whether to return the raw data stored in the record instead of the parsed value. :param errors: Error handling scheme to use when decoding bytes to text (default: 'backslashreplace'). .. py:method:: as_dict(raw: bool = False, errors: str | None = 'backslashreplace') -> dict[str, dissect.database.ese.util.RecordValue] Serialize the record as a dictionary. .. py:class:: TagField(record: RecordData, value: int) Represents a ``TAGFLD``, which contains information about a tagged field in a record. .. py:attribute:: __slots__ :value: ('_offset', 'flags', 'has_extended_info', 'identifier', 'offset', 'record') .. py:attribute:: fNullSmallPage :value: 8192 .. py:attribute:: fDerived :value: 32768 .. py:attribute:: record .. py:attribute:: identifier .. py:method:: __repr__() -> str .. py:property:: is_null :type: bool Return whether this tagged field is null. .. py:property:: is_derived :type: bool Return whether this tagged field is derived. .. py:function:: serialise_record_column_values(record: Record, column_names: list[str] | None = None, max_columns: int = 10) -> str