Skip to content

Conversation

@jpvanhal
Copy link
Collaborator

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.

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`.
@kvesteri kvesteri merged commit f2f7cf1 into kvesteri:master Apr 27, 2023
@jpvanhal jpvanhal deleted the use-custom-sql-construct-for-refresh-materialized-view branch April 27, 2023 11:17
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.

2 participants