diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-03-28 12:19:28 +0200 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-03-28 12:19:28 +0200 |
commit | 2f4536d6b08b69168ebf3e718cbd8e3002b9af5a (patch) | |
tree | 5307692fb341d7f924ee9b73f3751e7e56cfb192 /api/db.py | |
parent | 1f897d3f5ad11178cf4776ae4070c9d3e832f5f3 (diff) |
added comments
Diffstat (limited to 'api/db.py')
-rw-r--r-- | api/db.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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() |