From: Oleg B. <ph...@ph...> - 2010-07-30 18:09:26
|
On Fri, Jul 30, 2010 at 07:47:12PM +0200, Imre Horvath wrote: > Is there a way to directly access postgres sequences from sqlobject? > Like select nextval() from sql? SQLObject doesn't prevent you from running SQL queries directly. You can even use SQLObject connection objects: result = connection.queryOne('SELECT nextval() FROM some_sequence') SQLObject uses the following schema to generate sequence names: table = Table.sqlmeta.table idName = Table.sqlmeta.idName sequenceName = Table.sqlmeta.idSequence or '%s_%s_seq' % (table, idName) Oleg. -- Oleg Broytman http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |