From 2f4536d6b08b69168ebf3e718cbd8e3002b9af5a Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 28 Mar 2021 12:19:28 +0200 Subject: added comments --- api/db.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api/db.py') diff --git a/api/db.py b/api/db.py index f5b2539..b850a89 100644 --- a/api/db.py +++ b/api/db.py @@ -1,13 +1,15 @@ -# dit bestand is hier om circular imports te vermijden import os import sqlite3 +# open database db_path = os.path.abspath("database/database.db") connection = sqlite3.connect(db_path, check_same_thread=False) #! ^^^ Dit is onveilig en goede multithreading support moet nog geïmplementeerd worden +# load the sql extension used in social/search connection.enable_load_extension(True) connection.load_extension("./database/levenshtein.sqlext") +# sql cursor cursor = connection.cursor() -- cgit v1.2.3