On Wed, May 16, 2007 at 08:36:00PM +0800, ro wrote:
> I need to update all of records' synchronized attribute to 'True' in
> page table where the space.id is 1.
>
> from sqlobject.sqlbuilder import Update
> Update(Page.sqlmeta.table, True, ..., "Space.q.id=1")
Update is a low-level object, you have to convert it to an SQL query
and run the query yourself:
Page._connection.query(Page._connection.sqlrepr(
Update(Page.sqlmeta.table, {"synchronized": True}, where=Space.q.id==1)
))
"values" is dict of name:value of attributes and thir values to update.
> But I dont know what is the third parameter, from the source code I
> saw template.
> What is template?
Ignore it.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss