sqlbag
sqlbag copied to clipboard
Update to SQLAlchemy 2 style
- Replace Engine.execute with Connection.execute
- Ensure all raw SQL strings are wrapped in sqlalchemy.text
- Use explicit bound parameter dicts (see https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#execute-method-more-strict-execution-options-are-more-prominent)
tests/test_pg.py::test_errors_and_messages is failing for me, but it does so even with sqlbag@master and sqlalchemy 1.3, so not sure what's up there - perhaps a pg or psycopg2 config issue. All other tests are now passing with sqlalchemy 1.3 and 2.0.
Can we get this merged?