spacr.cli_database

Command-line SQLite health and concurrency audit.

Functions

build_parser(→ argparse.ArgumentParser)

Build the spacr-db-audit argument parser.

main(→ int)

Inspect or probe SQLite and report one combined audit result.

Module Contents

spacr.cli_database.build_parser() → argparse.ArgumentParser[source]

Build the spacr-db-audit argument parser.

Returns:

parser for read-only database checks and disposable concurrency probes.

spacr.cli_database.main(argv=None) → int[source]

Inspect or probe SQLite and report one combined audit result.

Parameters:

argv – command-line arguments without the program name; None reads the process arguments.

Returns:

0 when every requested integrity check and probe passes, or 1 when any requested operation fails or raises an exception.

Raises:

SystemExit – with status 2 for invalid arguments or when neither a database nor --probe is supplied.