From: Oleg B. <ph...@ph...> - 2007-05-16 12:54:04
|
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/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |