test stuff

This commit is contained in:
Alex Orid 2021-03-11 21:49:59 -05:00
parent 387ba00367
commit d80e3741d4

8
db.py
View File

@ -23,7 +23,10 @@ class db_module():
self.connection = sqlite3.connect(":memory:")
self.cursor = self.connection.cursor()
self.dirtyMode:bool = False
self.create_table()
self.dirtyModeSetup()
def dirtyModeSetup(self):
self.create_table('testing')
self.get_data()
def setup_connection(self, newName:str):
@ -33,7 +36,8 @@ class db_module():
# Table Stuff
def create_table(self, tableName: str = ""):
print("making stuff....")
self.cursor.execute("CREATE TABLE testing (key text, data text, bonusdata text)")
command = 'CREATE TABLE ' + tableName + ' (key text, data text, bonusdata text)'
self.cursor.execute(command)
self.cursor.execute("INSERT INTO testing VALUES ('testing','testerino','extra stuff 1')")
self.cursor.execute("INSERT INTO testing VALUES ('testing','testerinoz','extra stuff 2')")
self.cursor.execute("INSERT INTO testing VALUES ('testing','testerinozy','extra stuff 3')")