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

Allow configuring libsqlite location #119

Closed
mxcl opened this issue Jan 23, 2024 · 5 comments
Closed

Allow configuring libsqlite location #119

mxcl opened this issue Jan 23, 2024 · 5 comments

Comments

@mxcl
Copy link

mxcl commented Jan 23, 2024

I would like to bundle my own sqlite library, and setting the env variable is not viable. Can I pass it to the Database constructor or another config function?

@DjDeveloperr
Copy link
Member

Is it viable if you import a module before sqlite3 module is referenced at all that just does Deno.env.set to set the custom sqlite library path? Currently we just load the shared library when the module is evaluated, but if it helps we can lazy load it upon creating first instance of Database class.

@mxcl
Copy link
Author

mxcl commented Jan 23, 2024

Yes but that would require my app to have full --allow-env. Certainly I can do that for now but it is not my long term preference.

Edit: ah, I didn’t realize the library downloads the sqlite3 library when the module is imported. I’m going to vendor the library and remove that. Thanks for consideration of my request.

@mxcl
Copy link
Author

mxcl commented Sep 5, 2024

Closing as the design of this library prevents another mechanism.

@mxcl mxcl closed this as completed Sep 5, 2024
@DjDeveloperr
Copy link
Member

@mxcl It can be altered without affecting performance I believe, we can make a new, manual entry point which allows configuration and make the default one from mod.ts download and cache it locally. If you are still interested, I can work on that

@mxcl
Copy link
Author

mxcl commented Sep 6, 2024

Certainly would mean I don’t have to vendor and apply my mods every release! I can do the work, just didn’t think it was possible since the import mechanism seemed to be controlled by the deno runtime at module load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants