Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ A lightweight, cross-platform PyQt6 desktop SQLite database viewer. The app lets

- Browse tables and view row data with pagination
- Run custom SQL queries with syntax highlighting and CSV export
- Execute write operations (INSERT, UPDATE, DELETE) and DDL (CREATE, DROP, ALTER)
- Destructive query confirmation dialog for safety
- Light/Dark theme switching (Ctrl+D) with persistent preference
- Monospace font in SQL editor and schema view
- Keyboard shortcuts: Ctrl+Enter / F5 (run query), Ctrl+R (refresh tables)
- Display table schema metadata
- Persistent recent files list for quick access
- Debian package builder for Ubuntu (Python-dependent bundle)
Expand Down Expand Up @@ -89,12 +94,12 @@ sqliteview /path/to/database.sqlite
## Running Tests

```bash
pytest
uv run python -m pytest tests/ -v
```

## Packaging

- Build wheel + sdist: `python -m build`
- Build wheel + sdist: `uv run python -m build`
- Build Debian package: `./scripts/build_deb.sh`
- Generated packages are placed in `dist/`

Expand Down
9 changes: 7 additions & 2 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

- ページネーション付きでテーブルを閲覧し、行データを表示
- シンタックスハイライトとCSVエクスポート機能を備えたカスタムSQLクエリの実行
- 書き込み操作(INSERT, UPDATE, DELETE)およびDDL(CREATE, DROP, ALTER)の実行
- 破壊的クエリの安全確認ダイアログ
- ライト/ダークテーマの切替(Ctrl+D)と設定の永続化
- SQLエディタ・スキーマ表示のモノスペースフォント
- キーボードショートカット: Ctrl+Enter / F5(クエリ実行)、Ctrl+R(テーブルリフレッシュ)
- テーブルスキーマのメタデータを表示
- 素早いアクセスのための最近使用したファイル一覧の永続化
- Ubuntu用のDebianパッケージビルダー(Python依存バンドル)
Expand Down Expand Up @@ -89,12 +94,12 @@ sqliteview /path/to/database.sqlite
## テストの実行

```bash
pytest
uv run python -m pytest tests/ -v
```

## パッケージング

- wheel + sdist のビルド: `python -m build`
- wheel + sdist のビルド: `uv run python -m build`
- Debian パッケージのビルド: `./scripts/build_deb.sh`
- 生成されたパッケージは `dist/` に配置されます

Expand Down
17 changes: 13 additions & 4 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@
- Implements the main window, table browser, query editor, and result views using PyQt6 widgets.
- Separates UI widgets from data access via signal/slot connections.
3. **Data access layer (`sqliteviewer.database`)**
- Provides `DatabaseService` for opening SQLite files, listing tables, describing schemas, executing queries, and streaming rows.
- Provides `DatabaseService` for opening SQLite files, listing tables, describing schemas, executing queries (read and write), and streaming rows.
- Supports DML (INSERT/UPDATE/DELETE), DDL (CREATE/DROP/ALTER), and TCL (BEGIN/COMMIT/ROLLBACK).
- Includes query classification (`classify_query`) and destructive operation detection (`is_destructive_query`) with SQL noise stripping for safe keyword matching.
- Includes pragmatic safeguards (e.g., limiting returned rows) to keep the UI responsive.
4. **Utility module (`sqliteviewer.resources`)**
4. **Theme system (`sqliteviewer.theme`)**
- Manages light/dark theme switching via QSS stylesheets.
- Persists user preference via `QSettings`.
5. **SQL syntax highlighter (`sqliteviewer.sql_highlighter`)**
- Provides real-time syntax highlighting for the query editor.
- Supports theme-aware color schemes (light/dark).
6. **Utility module (`sqliteviewer.resources`)**
- Manages application metadata, version, and icon loading.
- Includes QSS theme files (`light.qss`, `dark.qss`) and desktop integration assets.

## Data flow

Expand All @@ -24,8 +33,8 @@ Results are translated into Qt models (`QStandardItemModel`) before reaching the

## Packaging & distribution

- Python packaging via `pyproject.toml` (setuptools backend).
- CLI/desktop entry point exposed as `sqliteviewer` console script.
- Python packaging via `pyproject.toml` (hatchling backend).
- CLI/desktop entry point exposed as `sqliteview` console script.
- Debian packaging script (`scripts/build_deb.sh`) leverages `python -m build` and `dpkg-deb` to produce `.deb` including bundled dependencies.
- Desktop integration provides `.desktop` launcher and application icon installed by the Debian package.

Expand Down
12 changes: 6 additions & 6 deletions docs/assumptions.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Assumptions for Ubuntu SQLite Viewer
# Assumptions for SQLite View

- Target platform is Ubuntu 22.04 LTS or newer with Python >= 3.10 preinstalled.
- End users install the application on desktop environments where X11/Wayland is available for GUI rendering.
- PyQt6 wheels are acceptable for bundling within the Debian package; no system Qt dependencies are required.
- Primary target platforms are Ubuntu/Linux (primary development), Windows (confirmed working), and macOS (untested). Python >= 3.10 is required.
- End users install the application on desktop environments where X11/Wayland (Linux) or native window system (Windows/macOS) is available for GUI rendering.
- PyQt6 wheels are acceptable for bundling within the Debian package; no system Qt dependencies are required. On Windows, PyQt6 bundles all necessary dependencies.
- Users operate on local SQLite databases; remote connections are out of scope.
- Database files are expected to fit in memory for paging 1,000-row chunks; extremely large tables may require streaming in a future iteration.
- Packaging leverages native Python tooling and `dpkg-deb`; `fpm` or other third-party packagers are not required on target systems.
- Debian packaging leverages native Python tooling and `dpkg-deb`; `fpm` or other third-party packagers are not required on target systems.
- CI runs on GitHub-hosted Ubuntu runners with internet access to install Python dependencies.
- Application internationalization/localization is not required for this release; English-only UI is acceptable.
- UI is English-only. Japanese documentation (`README_ja.md`) is provided separately.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ dev = [
]

[project.urls]
Homepage = "https://example.com/sqliteviewer"
Repository = "https://example.com/sqliteviewer/repo"
Homepage = "https://github.com/kwrkb/SQLiteView"
Repository = "https://github.com/kwrkb/SQLiteView"

[project.scripts]
sqliteview = "sqliteviewer.__main__:main"
Expand Down
106 changes: 0 additions & 106 deletions src/sqliteviewer.egg-info/PKG-INFO

This file was deleted.

23 changes: 0 additions & 23 deletions src/sqliteviewer.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/sqliteviewer.egg-info/dependency_links.txt

This file was deleted.

2 changes: 0 additions & 2 deletions src/sqliteviewer.egg-info/entry_points.txt

This file was deleted.

7 changes: 0 additions & 7 deletions src/sqliteviewer.egg-info/requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/sqliteviewer.egg-info/top_level.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/sqliteviewer/resources/sqliteviewer.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=SQLite Viewer
Comment=Browse and query SQLite databases
Exec=sqliteviewer %f
Exec=sqliteview %f
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

実行ファイル名が sqliteview に統一されたのは素晴らしい改善です。一貫性をさらに高めるため、このデスクトップファイル自体の名前も sqliteview.desktop に変更し、scripts/build_deb.sh 内の参照も更新することを検討してはいかがでしょうか。これにより、実行ファイル名、Debianパッケージ名、デスクトップファイル名がすべて sqliteview で統一され、より分かりやすくなります。

Icon=sqliteviewer
Terminal=false
Type=Application
Expand Down