update emails and verifing

This commit is contained in:
ben
2026-08-18 11:32:01 +02:00
parent 5f77a4d995
commit 953c371e48
3 changed files with 357 additions and 14 deletions
-12
View File
@@ -5,9 +5,6 @@ DB_PATH = Path(__file__).parent.parent / "database" / "calendar.db"
def get_connection():
"""
Maakt een verbinding met de SQLite database.
"""
conn = sqlite3.connect(DB_PATH)
conn.execute("PRAGMA foreign_keys = ON")
@@ -18,9 +15,6 @@ def get_connection():
def execute(query, params=()):
"""
Voor INSERT, UPDATE, DELETE.
"""
with get_connection() as conn:
cursor = conn.cursor()
cursor.execute(query, params)
@@ -30,9 +24,6 @@ def execute(query, params=()):
def fetch_one(query, params=()):
"""
Haalt één resultaat op.
"""
with get_connection() as conn:
cursor = conn.cursor()
cursor.execute(query, params)
@@ -52,9 +43,6 @@ def fetch_all(query, params=()):
def test_connection():
"""
Test of de database bereikbaar is.
"""
with get_connection() as conn:
cursor = conn.cursor()
cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")