update emails and verifing
This commit is contained in:
@@ -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';")
|
||||
|
||||
Reference in New Issue
Block a user