On Tuesday 23 September 2008 16:06:05 [EMAIL PROTECTED] wrote:
> Hello,
> is there any other way to truncate table besides using
>
> session.execute("truncate my_table")
> session.commit()
>
>
> i tried to improvise and but it didnt work:
>
> myt = my_table.query
> my_table.delete(myt)
>
> myt.delete()
>
>
> i could Iterate over my_table.query.all() but thats just looks wrong.

what about sql.text, and DBSession.connection()?

And make sure you traverse in the proper order over the tables - use e.g.

metadata.table_iterator()

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to