#0111 Database Abstraction #157

Merged
fuzzy merged 1 commit from feature/0111-database-abstraction into main 2026-07-06 07:51:14 +00:00
Owner

Completes database abstraction with MySQL and PostgreSQL support.

Changes:

  • src/hottea/sql.pyPostgreSQLGenerator, get_generator() factory
  • src/hottea/cli.py--db flag for selecting database backend
  • tests/test_sql.py — 8 new tests for PostgreSQL, get_generator
  • tests/test_cli.py — 3 new tests for --db flag

Usage:

hottea --db mysql --output heatmap.sql
hottea --db postgresql --output heatmap.sql

Supported backends:

  • sqlite3BEGIN TRANSACTION / COMMIT (default)
  • mysqlSTART TRANSACTION / COMMIT
  • postgresqlBEGIN / COMMIT

Closes: #0111, #0107, #0108, #0109, #0110

Completes database abstraction with MySQL and PostgreSQL support. **Changes:** - `src/hottea/sql.py` — `PostgreSQLGenerator`, `get_generator()` factory - `src/hottea/cli.py` — `--db` flag for selecting database backend - `tests/test_sql.py` — 8 new tests for PostgreSQL, get_generator - `tests/test_cli.py` — 3 new tests for --db flag **Usage:** ```bash hottea --db mysql --output heatmap.sql hottea --db postgresql --output heatmap.sql ``` **Supported backends:** - `sqlite3` — `BEGIN TRANSACTION` / `COMMIT` (default) - `mysql` — `START TRANSACTION` / `COMMIT` - `postgresql` — `BEGIN` / `COMMIT` **Closes:** #0111, #0107, #0108, #0109, #0110
feat(sql): add PostgreSQL generator and --db CLI flag
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m31s
d8ecc58ded
Complete database abstraction with MySQL and PostgreSQL support.

- PostgreSQLGenerator with BEGIN;/COMMIT; syntax
- get_generator() factory function
- --db CLI flag (choices: sqlite3, mysql, postgresql)
- All SQL generation shared via common SqlGenerator base class

Closes #107, #108, #109, #110, #111
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-06 07:48:58 +00:00
the.auditor left a comment

Audit Review — PR #157

Clean database abstraction completion. All 4 issues (#0107-#0110) addressed. PostgreSQLGenerator added, get_generator() factory with registry, --db CLI flag with choices validation. Tests cover all backends and unknown backend error.

No suggestions — clean PR.

Summary

Result: COMMENT — no issues found.

## Audit Review — PR #157 Clean database abstraction completion. All 4 issues (#0107-#0110) addressed. PostgreSQLGenerator added, get_generator() factory with registry, --db CLI flag with choices validation. Tests cover all backends and unknown backend error. No suggestions — clean PR. ## Summary **Result:** COMMENT — no issues found.
the.auditor left a comment

APPROVED. Database abstraction complete with all three backends. Merge when ready.

APPROVED. Database abstraction complete with all three backends. Merge when ready.
fuzzy merged commit d8ecc58ded into main 2026-07-06 07:51:14 +00:00
fuzzy deleted branch feature/0111-database-abstraction 2026-07-06 07:51:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/hottea!157
No description provided.