equal
deleted
inserted
replaced
275 |
275 |
276 # resource accessors ###################################################### |
276 # resource accessors ###################################################### |
277 |
277 |
278 def system_sql(self, sql, args=None, rollback_on_failure=True): |
278 def system_sql(self, sql, args=None, rollback_on_failure=True): |
279 """return a sql cursor on the system database""" |
279 """return a sql cursor on the system database""" |
280 if not sql.split(None, 1)[0].upper() == 'SELECT': |
280 if sql.split(None, 1)[0].upper() != 'SELECT': |
281 self.mode = 'write' |
281 self.mode = 'write' |
282 source = self.pool.source('system') |
282 source = self.pool.source('system') |
283 try: |
283 try: |
284 return source.doexec(self, sql, args, rollback=rollback_on_failure) |
284 return source.doexec(self, sql, args, rollback=rollback_on_failure) |
285 except (source.OperationalError, source.InterfaceError): |
285 except (source.OperationalError, source.InterfaceError): |