Skip to content

feat: pgx driver + WorkflowDatabase Start/Stop lifecycle#215

Merged
intel352 merged 1 commit intomainfrom
feat/database-pgx-start-stop
Mar 1, 2026
Merged

feat: pgx driver + WorkflowDatabase Start/Stop lifecycle#215
intel352 merged 1 commit intomainfrom
feat/database-pgx-start-stop

Conversation

@intel352
Copy link
Contributor

Summary

  • Register pgx/v5 stdlib driver alongside SQLite in module/database_drivers.go so database.workflow can connect to PostgreSQL without a separate driver import
  • Add Start(ctx)/Stop(ctx) methods to WorkflowDatabase so the modular framework auto-opens the DB at startup and closes at shutdown
  • Removes the need for a separate persistence.store module when using database.workflow for SQL pipeline steps (db_query, db_exec)

Context

BuyMyWishlist and other PostgreSQL-first deployments use database.workflow with driver: pgx directly. Without Start()/Stop(), the DB connection wasn't opened until the first step tried to use it, and there was no clean shutdown. Without the pgx driver import, users had to add it manually.

Test plan

  • go build ./... passes
  • go test ./module/... passes
  • CI checks

🤖 Generated with Claude Code

Register the pgx/v5 stdlib driver alongside SQLite so database.workflow
module can connect to PostgreSQL out of the box.

Add Start(ctx)/Stop(ctx) methods to WorkflowDatabase so the modular
framework auto-opens the DB connection at startup and closes it at
shutdown. This removes the need for a separate persistence.store module
when using database.workflow for direct SQL pipeline steps (db_query,
db_exec).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@intel352 intel352 merged commit 54b30d2 into main Mar 1, 2026
14 checks passed
@intel352 intel352 deleted the feat/database-pgx-start-stop branch March 1, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant