Esempio n. 1
0
 def __init__(self, database, *args, **kwargs): 
     if database == ':memory:':
         logging.warn('Creating new database in memory.')
     elif os.path.isfile(database):
         logging.info('Connecting to existing database: {:}'\
                      .format(database))
     else:
         logging.info('Creating new database: {:}'.format(database))
     SQLiteConnection.__init__(self, database, *args, **kwargs)
Esempio n. 2
0
 def execute(self, *args):
     """
     Execute sql code
     """
     logging.debug('SQL: ' + ' '.join([str(a) for a in args]))
     return SQLiteConnection.execute(self, *args)