Ejemplo n.º 1
0
	def _sql_version(self):
		'''internal init function to check version of SQLite driver in-use by QtSql module'''
		con='LiteyVersionCheck'
		db = QSqlDatabase.addDatabase("QSQLITE",con)
		db.setDatabaseName(':memory:')
		db.open()
		ver=db.exec_('select sqlite_version()')
		assert ver.next()
		result=str(ver.value(0))
		ver.finish()
		del ver
		db.close()
		del db
		QSqlDatabase.removeDatabase(con)
		return result
Ejemplo n.º 2
0
 def cleanup(self, conn_name):
     """ may not be the same connection name as appointed by 'name' argument
     See Worker class '__init__' method bellow """
     QSqlDatabase.removeDatabase(conn_name)