Skip to content

Commit faa6490

Browse files
committed
fix: Keep SQLite extensions enabled for database connections
- Comment out enable_load_extension(False) to keep spatial functions available - Add function test after loading SpatiaLite extension - Attempt to fix GeomFromText availability in write operations
1 parent b383113 commit faa6490

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mcp_server_sqlite/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ def _execute_query(self, query: str, params: Optional[Dict[str, Any]] = None) ->
338338
conn.execute("SELECT InitSpatialMetaData(1)")
339339
except:
340340
pass # Already initialized or not needed
341-
conn.enable_load_extension(False)
341+
# Keep extensions enabled for this connection
342+
# conn.enable_load_extension(False) # Comment out to keep functions available
342343
except Exception as e:
343344
# Log the actual error for debugging
344345
logger.debug(f"SpatiaLite loading failed: {e}")

0 commit comments

Comments
 (0)