On Sun, Nov 12, 2006 at 05:02:18PM +0600, Basil Shubin wrote:
> >    SELECT FOR UPDATE is supprted by SQLObject 0.8 (from the trunk). Not
> > sure if if MySQL implements it.
>
> Excuse me, but how I can use it? Give me a clue about how to use it with
> SQLObject.

   MyTable.select(MyTable.q.name==value, forUpdate=True)

   Postgres docs abut it at
http://www.postgresql.org/docs/7.4/static/sql-select.html

   "FOR UPDATE causes the rows retrieved by the SELECT statement to be
locked as though for update. This prevents them from being modified or
deleted by other transactions until the current transaction ends. That is,
other transactions that attempt UPDATE, DELETE, or SELECT FOR UPDATE of
these rows will be blocked until the current transaction ends. Also, if an
UPDATE, DELETE, or SELECT FOR UPDATE from another transaction has already
locked a selected row or rows, SELECT FOR UPDATE will wait for the other
transaction to complete, and will then lock and return the updated row (or
no row, if the row was deleted)."

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to