Pruefungskatalog/database.py
2022-03-18 09:26:05 +01:00

36 lines
648 B
Python

# TODO: Datenbank Klasse (CRUD)
import mysqlx
def create_database(db_cursor):
# TODO Datenbank erstellen
return
def create_table(db_cursor, database_name):
query = f'CREATE DATABASE {database_name}'
try:
db_cursor.execute(query)
except mysqlx.Error as err:
print('Something went wrong', err)
def add(db_cursor):
# TODO Frage / Antwort hinzufügen
return
def read_question(db_cursor):
# TODO Frage / Antwort auslesen
return
def update_question(db_cursor):
# TODO Frage / Antwort Aktualisieren
return
def del_question(db_cursor):
# TODO Frage / Antworte löschen
return