Skip to content

feat: support CastleDM DSNs with async driver injection#5

Merged
jrhuerta merged 2 commits into
mainfrom
feat/async-driver-mysql-support
Mar 12, 2026
Merged

feat: support CastleDM DSNs with async driver injection#5
jrhuerta merged 2 commits into
mainfrom
feat/async-driver-mysql-support

Conversation

@jrhuerta
Copy link
Copy Markdown
Owner

Summary

  • auto-inject async SQLAlchemy driver suffixes for bare DATABASE_URL schemes (postgresql://, mysql://, sqlite://) so acc castledm dsn output works directly
  • add MySQL support paths for query dialect detection and read-only session preparation (MAX_EXECUTION_TIME + START TRANSACTION READ ONLY)
  • add tests for URL rewriting, MySQL dialect handling, and MySQL read-only session behavior; update docs and AGENTS notes accordingly

Test plan

  • python -m pytest -q tests/test_config.py tests/test_query_validator_security.py tests/test_mcp_interface.py
  • manual MCP smoke checks against CastleDM DSN (allowed query, blocked column query, blocked UPDATE/DELETE)

Auto-inject async SQLAlchemy drivers for bare postgresql/mysql/sqlite URLs so acc castledm dsn output works directly as DATABASE_URL. Add MySQL dialect/session handling and test coverage to preserve read-only enforcement across backends.
Keep the README provider-agnostic by removing the CastleDM DSN integration section while preserving the general DATABASE_URL behavior documentation.
@jrhuerta jrhuerta merged commit 3ed4905 into main Mar 12, 2026
3 checks passed
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