:py:mod:`dissect.esedb.index` ============================= .. py:module:: dissect.esedb.index Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.esedb.index.Index Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.esedb.index.encode_key Attributes ~~~~~~~~~~ .. autoapisummary:: dissect.esedb.index.JET_cbKeyMost_OLD dissect.esedb.index.bPrefixNull dissect.esedb.index.bPrefixZeroLength dissect.esedb.index.bPrefixNullHigh dissect.esedb.index.bPrefixData dissect.esedb.index.bSentinel .. py:data:: JET_cbKeyMost_OLD :value: 255 .. py:class:: Index(table: dissect.esedb.table.Table, record: dissect.esedb.record.Record = None) Bases: :py:obj:`object` Represents an index on a table. This is still very much WIP but works for basic indexes. For example, none of the special flags are currently implemented. :param table: The table this index is from. :param record: The record in the catalog for this index. .. py:method:: root() -> dissect.esedb.page.Page Return the root page of this index. .. py:method:: column_ids() -> list[int] Return a list of column IDs that are used in this index. .. py:method:: columns() -> list[dissect.esedb.table.Column] Return a list of all columns that are used in this index. .. py:method:: search(**kwargs) -> dissect.esedb.record.Record Search the index for the requested values. Specify the column and value as a keyword argument. .. py:method:: search_key(key: bytes) -> dissect.esedb.page.Node Search the index for a specific key. :param key: The key to search for. .. py:method:: key_from_record(record: dissect.esedb.record.Record) -> bytes Generate a key for this index from a record. :param record: The record to generate a key for. .. py:method:: make_key(values: dict[str, dissect.esedb.c_esedb.RecordValue]) -> bytes Generate a key out of the given values. :param values: A map of the column names and values to generate a key for. .. py:method:: __repr__() -> str Return repr(self). .. py:data:: bPrefixNull :value: 0 .. py:data:: bPrefixZeroLength :value: 64 .. py:data:: bPrefixNullHigh :value: 192 .. py:data:: bPrefixData :value: 127 .. py:data:: bSentinel :value: 255 .. py:function:: encode_key(index: Index, column: dissect.esedb.table.Column, value: dissect.esedb.c_esedb.RecordValue, max_size: int) -> bytes Encode various values into their normalized index key form. :param column: The column of the value to encode. :param value: The value that needs encoding. :param max_size: The maximum key segment size.