dissect.esedb.cursor
¶
Module Contents¶
Classes¶
A simple cursor implementation for searching the ESE B+Trees |
Functions¶
Search the tree, starting from the given |
- class dissect.esedb.cursor.Cursor(esedb: dissect.esedb.esedb.EseDB, page: int | dissect.esedb.page.Page)¶
A simple cursor implementation for searching the ESE B+Trees
- Parameters:
esedb – An instance of
EseDB
.page – The page to open a cursor on.
- esedb¶
- node() dissect.esedb.page.Node ¶
Return the node the cursor is currently on.
- next() dissect.esedb.page.Node ¶
Move the cursor to the next node and return it.
Can move the cursor to the next page as a side effect.
- next_page() None ¶
Move the cursor to the next page in the tree.
- Raises:
NoNeighbourPageError – If the current page has no next page.
- prev() dissect.esedb.page.Node ¶
Move the cursor to the previous node and return it.
Can move the cursor to the previous page as a side effect.
- prev_page() None ¶
Move the cursor to the previous page in the tree.
- Raises:
NoNeighbourPageError – If the current page has no previous page.
- search(key: bytes, exact: bool = True) dissect.esedb.page.Node ¶
Search the tree for the given key.
Moves the cursor to the matching node, or on the last node that is less than the requested key.
- Parameters:
key – The key to search for.
exact – Whether to only return successfully on an exact match.
- Raises:
KeyNotFoundError – If an
exact
match was requested but not found.
- dissect.esedb.cursor.find_node(page: dissect.esedb.page.Page, key: bytes) dissect.esedb.page.Node ¶
Search the tree, starting from the given
page
and search forkey
.- Parameters:
page – The page to start searching from. Should be a branch page.
key – The key to search.