On 9/25/15 3:13 AM, Chris Withers wrote:
Hi All,
Is this still the best way to hand views, or are there later and
greater things in 1.0+?
https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/Views
How would I make a view behave like a normal declarative class (column
attributes, etc), but while still having it create itself as part of
create_all?
There's probably some semi-elaborate way to do this, though it would
take some tinkering.
Any Table can just have as its name the name of your view, and you'd
link it to declarative with __table__. That won't get you the
create_all() part and you might want this Table to be on a separate
MetaData so that it isn't included in it, but it would get you started.
cheers,
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.