test stuff
This commit is contained in:
parent
387ba00367
commit
d80e3741d4
8
db.py
8
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')")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user