Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use custom SQL construct for refreshing materialized views (#703)
Add a custom SQL construct, `RefreshMaterializedView`, to compile the SQL for `REFRESH MATERIALIZED VIEW ...` command. Use the SQL construct in `refresh_materialized_view` function to execute the SQL. This resolves an issue where `refresh_materialized_view` crashed with `AttributeError: 'NoneType' object has no attribute 'engine'` when using Flask-SQLAlchemy 3.0 where `session.bind` is `None`.
- Loading branch information