-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: use context manager for SQLAlchemy execute
See #3130 AttributeError: 'Engine' object has no attribute 'execute' And also use text for raw SQL commands Use the text() construct, or the Connection.exec_driver_sql() method to invoke a driver-level SQL string. And finially setting `future=True` which is going to be passed to `create_engine` by Flask-SQLAlchemy to ensure compatibility between SQLAlchemy 1.x and 2.0. Otherwise we would get AttributeError: 'Connection' object has no attribute 'commit'
- Loading branch information
Showing
5 changed files
with
56 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters