You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm confused as to if this adds view support to the SQLAlchemy ORM?
As in, how would I go about defining a view model with this (that would be created/dropped automatically when the create_all/drop_all commands are used)?
Ideally one would be able to do something like:
class MyView(ModelView):
definition = 'SELECT * FROM mytable'
# column declaration that reflects the SQL
But I'm not sure if this addon allows for anything remotely like that.
The text was updated successfully, but these errors were encountered:
Was looking at an old recipe (https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/Views) but it's using the deprecated execute_at. Tried replicating it using the new DDL events, which went alright I think, however, it still (obviously) emits the normal create and drop statements. Which means it's creating a table, then tries to create a view. Maybe we're supposed to override the create and drop functions instead?
I haven't personally used the ORM much, so the use cases there aren't immediately obvious to me. I'll try to take more of a look at your suggestions later this week.
I'm confused as to if this adds view support to the SQLAlchemy ORM?
As in, how would I go about defining a view model with this (that would be created/dropped automatically when the create_all/drop_all commands are used)?
Ideally one would be able to do something like:
But I'm not sure if this addon allows for anything remotely like that.
The text was updated successfully, but these errors were encountered: