Sean Davis wrote:
> Just a quick question, but is there code available to autogenerate
> code for SA or Elixir from an existing (rather large) database?  I
> could use SQLSoup directly, but it really helps me to be able to see
> the generated code.
There is no "generated code".. sqlsoup uses autoloading.
Autoloading is available outside sqlsoup too, just assign your table with

mytable = sa.Table(name, database.metadata, autoload=True)

class MyTable(object):
    pass

and you bind them together with mapper(...) or assign_mapper(...) as usual.

No code generation needed. If sqlalchemy had such a feature, like
Django, I'm not sure I would like it.

> Also, some of the classes will benefit from some added methods.
Just create them under MyTable, or under a superclass of MyTable. It's
quite common to have a superclass for all or some of the domain objects,
even when it has nothing to do with table inheritance.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to