dissect.database.ese.table¶
Module Contents¶
Classes¶
Represents a table in an ESE database. |
|
Parse and interact with the catalog table. |
- class dissect.database.ese.table.Table(db: dissect.database.ese.ese.ESE, name: str, root_page: int, columns: list[Column] | None = None, indexes: list[dissect.database.ese.index.Index] | None = None, record: dissect.database.ese.record.Record = None)¶
Represents a table in an ESE database.
Contains all the relevant metadata of the table, as well as all columns and indices that have been added by the catalog.
- Parameters:
- db¶
- name¶
- root_page¶
- indexes: list[dissect.database.ese.index.Index] = []¶
- record = None¶
- __repr__() str¶
- property root: dissect.database.ese.page.Page¶
Return the root page of the table.
- property lv_page: dissect.database.ese.page.Page¶
Return the long value page of the table.
- Raises:
TypeError – If the table has no long values.
- column(name: str) Column¶
Return the column with the given name.
- Parameters:
name – The name of the column to return.
- Raises:
KeyError – If no column with the given name exists.
- property column_names: list[str]¶
Return a list of all the column names.
- property primary_index: dissect.database.ese.index.Index | None¶
- cursor() dissect.database.ese.cursor.Cursor | None¶
Create a new cursor for this table.
- index(name: str) dissect.database.ese.index.Index¶
Return the index with the given
name.- Parameters:
name – The name of the index to return.
- Raises:
KeyError – If no index with the given name exists.
- find_index(column_names: list[str]) dissect.database.ese.index.Index | None¶
Find the most suitable index to search for the given columns.
- Parameters:
column_names – A list of column names to find the best index for.
- search(**kwargs: dissect.database.ese.util.RecordValue) dissect.database.ese.record.Record | None¶
Search for a record in the table.
- Parameters:
**kwargs – The columns and values to search for.
- Returns:
The first record that matches the search criteria, or
Noneif no record was found.
- records() collections.abc.Iterator[dissect.database.ese.record.Record]¶
Return an iterator of all the records of the table.
- class dissect.database.ese.table.Column(identifier: int, name: str, type_: dissect.database.ese.c_ese.JET_coltyp, record: dissect.database.ese.record.Record | None = None)¶
- identifier¶
- name¶
- type¶
- record = None¶
- __repr__() str¶
- property offset: int¶
- property is_fixed: bool¶
- property is_variable: bool¶
- property is_tagged: bool¶
- property is_text: bool¶
- property is_binary: bool¶
- property size: int¶
- property default: Any | None¶
- property encoding: dissect.database.ese.c_ese.CODEPAGE | None¶
- property ctype: dissect.database.ese.util.ColumnType¶
- class dissect.database.ese.table.Catalog(db: dissect.database.ese.ese.ESE, root_page: dissect.database.ese.page.Page)¶
Parse and interact with the catalog table.
The catalog is a special table that contains the metadata for all the other tables in the database.
- Parameters:
db – An instance of
ESE.root_page – The root page of the catalog table.
- CATALOG_COLUMNS¶
- db¶
- root_page¶
- tables = []¶