hypershell.data¶
Access to low-level database objects and methods.
Functions¶
- ensuredb(auto_init: bool = False) None[source]¶
Ensure database configuration before applying any operations. If SQLite and auto_init we run
initdb(), elsecheckdb().
- truncatedb() None[source]¶
Truncate database tables.
Warning
This action is destructive, cannot be reversed, and proceeds without confirmation.
- vacuumdb(path: str = None) None[source]¶
Apply database vacuum (optionally into backup location for SQLite).
Constants¶
- DATABASE_ENABLED: Final[bool] = True¶
Set if database has been configured.
- DATABASE_PROVIDER: Final[str] = 'sqlite'¶
Either sqlite/turso or postgres.