Skip to content

Conversation

@risicle
Copy link

@risicle risicle commented Oct 21, 2025

Addresses #1402

Haven't added a CHANGES.rst entry as I don't know what version this would make it in to (I'd imagine a change like this might at least warrant a minor version bump?)

@risicle risicle force-pushed the ris-record-queries-bind-key branch from 62214ce to 1e771f3 Compare October 21, 2025 20:26
@risicle risicle marked this pull request as ready for review October 21, 2025 20:27
spatel033 added a commit to alphagov/notifications-api that referenced this pull request Dec 5, 2025
…uery

Replace flask_sqlalchemy's get_recorded_queries with SQLAlchemy event listeners that capture the bind_key for each engine. Add QueryInfo dataclass with statement, parameters, and bind_key fields. This enables tests to verify that queries are being routed to the correct database when using db.session_bulk.
This is an alternative to the existing PR pallets-eco/flask-sqlalchemy#1403 for flask-sqlalchemy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant