On Dec 21, 9:48 am, simpsomboy <[EMAIL PROTECTED]> wrote:
>
> I need to create some database objects(like a trigger) and insert some
> initial data into table after creation, so I need to know if have some
> way to do it transparent on sqlalchemy

database trigger syntax is pretty database specific so we dont have a
generic DDL construct for that right now.  you can issue the DDL using
a textual execute like engine.execute("CREATE TRIGGER ...").  for
inserting of data you usually would use a table.insert() construct.

> like putting a method on
> mapped class or provide a function to mapper.

you've lost me here.  I don't see the connection between a trigger in
your database and a method on one of your mapped classes.

> if have no way to do this, I need to get a list with all mapped
> classes, than I will create my own process to create these objects and
> insert the default data walking over each class.

you'd have to show me what you mean, I don't understand why you need
to scroll through all your classes just to set up triggers in your
schema.  The schema exists independently of any ORM configuration
which uses that schema.

--~--~---------~--~----~------------~-------~--~----~
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