:py:mod:`dissect.esedb.cursor` ============================== .. py:module:: dissect.esedb.cursor Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.esedb.cursor.Cursor Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.esedb.cursor.find_node .. py:class:: Cursor(esedb: dissect.esedb.esedb.EseDB, page: Union[int, dissect.esedb.page.Page]) A simple cursor implementation for searching the ESE B+Trees :param esedb: An instance of :class:`~dissect.esedb.esedb.EseDB`. :param page: The page to open a cursor on. .. py:method:: node() -> dissect.esedb.page.Node Return the node the cursor is currently on. .. py:method:: 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. .. py:method:: next_page() -> None Move the cursor to the next page in the tree. :raises NoNeighbourPageError: If the current page has no next page. .. py:method:: 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. .. py:method:: prev_page() -> None Move the cursor to the previous page in the tree. :raises NoNeighbourPageError: If the current page has no previous page. .. py:method:: 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. :param key: The key to search for. :param exact: Whether to only return successfully on an exact match. :raises KeyNotFoundError: If an ``exact`` match was requested but not found. .. py:function:: find_node(page: dissect.esedb.page.Page, key: bytes) -> dissect.esedb.page.Node Search the tree, starting from the given ``page`` and search for ``key``. :param page: The page to start searching from. Should be a branch page. :param key: The key to search.