openwpm.utilities.db_utils module

openwpm.utilities.db_utils.any_command_failed(db: Path) bool[source]

Returns True if any command in a given database failed

openwpm.utilities.db_utils.get_content(db_name: Path) Iterator[Tuple][source]

Yield key, value pairs from the deduplicated leveldb content database

Parameters:

db_name (Path) – The full path to the current db

openwpm.utilities.db_utils.get_javascript_entries(db: Path, all_columns: bool = False, as_tuple: bool = False) List[Row | Tuple[Any, ...]][source]
openwpm.utilities.db_utils.query_db(db: Path, query: str, params: Any = None, as_tuple: bool = False) List[Row | Tuple[Any, ...]][source]

Run a query against the given db.

If params is not None, securely construct a query from the given query string and params.