diff --git a/db.py b/db.py index 6609e71..7bcb074 100644 --- a/db.py +++ b/db.py @@ -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')")