Re: [SQLObject] Executing arbitrary SQL commands
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Sam N. <li...@se...> - 2005-10-14 00:05:05
|
Jorge Godoy wrote: > Hi! > > > Is there any recommended (if it is possible) way to execute arbitrary SQL > commands? For example, in one application I had this 'start' block: > > query = QSqlQuery('BEGIN') > query = QSqlQuery('SET CONSTRAINTS amostras_exames_amostra_id_fkey DEFERRED') > query = QSqlQuery('SET CONSTRAINTS amostras_toxicologia_amostra_id_fkey DEFERRED') > > How could I issue the 'SET CONSTRAINTS' commands? (The begin I'd do with the > corresponding transaction command.) > > > TIA, I use my sqlobject class' _connection object to get a cursor and then I use that to issue queries. Of course this won't play nice with sqlobject's caching, so care must be taken. - Sam |