def Refresh(self): query = "SELECT URLs FROM URL WHERE URL.Condition='0'" use = Dbmanager() results = use.database().execute(query) self.tableWidget.setRowCount(0) for row_num, row_data in enumerate( results): #For statement creates a table for the database. self.tableWidget.insertRow(row_num) for col_num, data in enumerate(row_data): self.tableWidget.setItem(row_num, col_num, QtWidgets.QTableWidgetItem(str(data))) use.database().close()
def test_database(self): clas = Dbmanager() clas.database() self.assertTrue('connection = sqlite3.connect("urlData.db")')
def __init__(self): super().__init__() self.urlData = pd.read_sql_query("SELECT * FROM Url", Dbmanager.database(self))