On Mon, Feb 02, 2009 at 09:56:15AM -0800, Pavel Skvazh wrote:
> 
> Session.execute('INSERT INTO SOMETHING SOMETHING / DELETE/ UPDATE')
> 
> Do I have to call Session.commit() after this or it's already taken
> care of? In other words does the literal sql statements follow the
> session transaction rules or they act on there own?
> 
sess.execute() will execute whatever you pass it immediately.

> And since this works and worked for me for a long time now, what's the
> benefit of from sqlalchemy.sql import text that I noticed in the docs
> lately?
> 
Using text() creates a ClauseElement that you can whack together with other
constructs. See the docs here for more info:
http://www.sqlalchemy.org/docs/05/sqlexpression.html#using-text

> Thanks!
> > 

-- 
--------------------------
Bob Farrell
pH, an Experian Company
www.phgroup.com
Office Line: 020 7598 0310
Fax: 020 7598 0311
--------------------------

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

Reply via email to