nexusLIMS.tui.apps.db_browser#
Read-only NexusLIMS database browser TUI.
Provides NexusLIMSDBApp, a Textual app that wraps Squall’s
SQLiteClientApp to give a stripped-down, read-only view of the database:
The “Open Database” button and “Execute SQL” tab are removed.
The Table Viewer tab gains a live filter input and click-to-sort column headers, both implemented via parameterised SQL queries so they compose correctly and never expose the database to modification.
Usage#
.. code-block:: python
from argparse import Namespace
from nexusLIMS.tui.apps.db_browser import NexusLIMSDBApp
app = NexusLIMSDBApp(Namespace(filepath="/path/to/nexuslims.db"))
app.run()
Module Contents#
Classes#
Table viewer with live full-text filter and sortable column headers. |
|
Read-only NexusLIMS database browser. |
API#
- class nexusLIMS.tui.apps.db_browser.NexusLIMSTableViewerPane(db_path: Path, *args, **kwargs)[source]#
Bases:
textual.widgets.TabPaneTable viewer with live full-text filter and sortable column headers.
All filtering and sorting is performed via parameterised SQL queries so they compose naturally and the database is never modified.
- DEFAULT_CSS = <Multiline-String>#
- class nexusLIMS.tui.apps.db_browser.NexusLIMSDBApp(cli_args: Namespace, *args, **kwargs)[source]#
Bases:
squall.squall.SQLiteClientAppRead-only NexusLIMS database browser.
Extends Squall’s
SQLiteClientAppwith:The “Open Database” button hidden (path always comes from
NX_DB_PATH)The “Execute SQL” tab removed to prevent accidental modifications
The Table Viewer replaced with
NexusLIMSTableViewerPane, which adds a live filter input and sortable column headers
- CSS_PATH#
- DEFAULT_CSS#
‘#center { display: none; }’