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.
|