-
-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --load-extension option to datasette for loading extra SQLite extensions #110
Comments
Allows loading of SQLite extensions. Refs #110.
Here's how I tested this. First I downloaded and started a docker container using https://hub.docker.com/r/prolocutor/python3-sqlite-ext - which includes the compiled spatialite extension. This downloads it, then starts a shell in that container.
Installed a pre-release build of datasette which includes the new
Now grab a sample database from https://www.gaia-gis.it/spatialite-2.3.1/resources.html - and unzip and rename it (datasette doesn't yet like databases with dots in their filename):
Now start datasette on port 8018 (the port I exposed earlier) with the extension loaded:
Now I can confirm that it worked: http://localhost:8018/test23-c88bc35?sql=select+ST_AsText%28Geometry%29+from+HighWays+limit+1 If I run datasette without
|
To finish up, I committed the image I created in the above so I can run it again in the future:
Now I can run it like this:
|
This would allow users with extra SQLite extensions installed (like spatialite) to load them at runtime.
Inspired by this comment: #46 (comment)
The text was updated successfully, but these errors were encountered: