Skip to content
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

SQLIte integration: How to Load a SQLIte Extension on a per database basis? #377

Open
asitemade4u opened this issue Sep 11, 2019 · 1 comment
Labels
feature request New issue opened using "Feature request" template good first issue Easy issue for beginners to start contributing to the project

Comments

@asitemade4u
Copy link

asitemade4u commented Sep 11, 2019

Context: I am using Spatialite on SQLIte and its requirement is that a library be loaded for each database. As I work on Ubuntu, the path of the library is /usr/local/lib/mod_spatialite.so
If I do not load the library, the extension sends an error about VirtualElementary, which is precisely related to Spatialite [see detail here]

My idea: in self contained SQLite GUIs, such as the SQLite Studio or DB Browser, there is a setting that allows to load a library by providing its pathway, either for all databases or on a per-database basis.
It would be great to implement this kind of function in the extension,.

Alternative: the other solution would be to automatically execute a SQL query every time a database is connected, then an instruction such as SELECT load_extension('mod_spatialite')

Details: Ubuntu 18.10, Node 8.11.3, last version of VS Code

@asitemade4u asitemade4u added the feature request New issue opened using "Feature request" template label Sep 11, 2019
@mtxr mtxr added this to the v0.22 milestone Nov 6, 2019
@mtxr
Copy link
Owner

mtxr commented Nov 6, 2019

For future reference: https://github.com/mapbox/node-sqlite3/wiki/Extensions

@mtxr mtxr added the good first issue Easy issue for beginners to start contributing to the project label Nov 9, 2019
@mtxr mtxr removed this from the v0.22 milestone Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template good first issue Easy issue for beginners to start contributing to the project
Projects
None yet
Development

No branches or pull requests

2 participants