Axione-IPE-Viewer/webapp/ipe_fetcher/sqlite_connector/cursor.py
2022-04-13 11:30:11 +02:00

8 lines
249 B
Python

import sqlite3
def getCursorWithSpatialite(db_path: str = None) -> sqlite3.Cursor:
db = sqlite3.connect(db_path)
cur = db.cursor()
db.enable_load_extension(True)
cur.execute('SELECT load_extension("mod_spatialite")')
return cur