equal
deleted
inserted
replaced
707 cnx = cnx.cnxset.cnx |
707 cnx = cnx.cnxset.cnx |
708 # getattr to get the actual connection if cnx is a CnxLoggingWrapper |
708 # getattr to get the actual connection if cnx is a CnxLoggingWrapper |
709 # instance |
709 # instance |
710 print 'exec', query, args, getattr(cnx, '_cnx', cnx) |
710 print 'exec', query, args, getattr(cnx, '_cnx', cnx) |
711 try: |
711 try: |
712 # str(query) to avoid error if it's an unicode string |
712 # str(query) to avoid error if it's a unicode string |
713 cursor.execute(str(query), args) |
713 cursor.execute(str(query), args) |
714 except Exception as ex: |
714 except Exception as ex: |
715 if self.repo.config.mode != 'test': |
715 if self.repo.config.mode != 'test': |
716 # during test we get those message when trying to alter sqlite |
716 # during test we get those message when trying to alter sqlite |
717 # db schema |
717 # db schema |
754 """ |
754 """ |
755 if server.DEBUG & server.DBG_SQL: |
755 if server.DEBUG & server.DBG_SQL: |
756 print 'execmany', query, 'with', len(args), 'arguments' |
756 print 'execmany', query, 'with', len(args), 'arguments' |
757 cursor = cnx.cnxset.cu |
757 cursor = cnx.cnxset.cu |
758 try: |
758 try: |
759 # str(query) to avoid error if it's an unicode string |
759 # str(query) to avoid error if it's a unicode string |
760 cursor.executemany(str(query), args) |
760 cursor.executemany(str(query), args) |
761 except Exception as ex: |
761 except Exception as ex: |
762 if self.repo.config.mode != 'test': |
762 if self.repo.config.mode != 'test': |
763 # during test we get those message when trying to alter sqlite |
763 # during test we get those message when trying to alter sqlite |
764 # db schema |
764 # db schema |