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

Load extensions with Sqlite3 ?? #275

Closed
andyl opened this issue Jan 15, 2024 · 4 comments
Closed

Load extensions with Sqlite3 ?? #275

andyl opened this issue Jan 15, 2024 · 4 comments

Comments

@andyl
Copy link
Contributor

andyl commented Jan 15, 2024

Exqlite.Basic has functions enable_load_extension and load_extension.

Exqlite.Sqlite3 only has function enable_load_extension.

Is it possible to load extensions with Sqlite3 ??

@warmwaffles
Copy link
Member

Yes using the Connection configuration you can:

config :exqlite, load_extensions: [ "./priv/sqlite/\#{arch_dir}/rotate" ]

Here is a ton of information about the configurations that can be passed to exqlite. Sorry that the information is buried in there. https://hexdocs.pm/exqlite/Exqlite.Connection.html#connect/1

Just be aware, when you load extensions that they need to be compiled for that machine and must be compatible with the sqlite version.

@andyl
Copy link
Contributor Author

andyl commented Jan 16, 2024

Thanks very much! Would you like a PR for a small update to README with this docco?

@warmwaffles
Copy link
Member

@andyl definitely, an example section in the README would be fine.

@andyl
Copy link
Contributor Author

andyl commented Jan 16, 2024

Done.

@andyl andyl closed this as completed Jan 16, 2024
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