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

python/driver/sqlite: add ability to load_extension #1043

Closed
judahrand opened this issue Sep 7, 2023 · 2 comments · Fixed by #1162
Closed

python/driver/sqlite: add ability to load_extension #1043

judahrand opened this issue Sep 7, 2023 · 2 comments · Fixed by #1162
Assignees

Comments

@judahrand
Copy link
Contributor

The standard library sqlite3 module has the methods

conn.enable_load_extension(enabled: bool)`
conn.load_extenstion(extenstion: str)

if Python is compiled with --enable-loadable-sqlite-extensions.

It would be nice if such options were provided by the ADBC driver (perhaps enabled by default?). I'm thinking that extensions such as https://github.com/phiresky/sqlite-zstd would be incredibly valuable for use cases where talking to sqlite using ADBC makes sense.

@lidavidm lidavidm added this to the ADBC Libraries 0.8.0 milestone Sep 7, 2023
@lidavidm
Copy link
Member

lidavidm commented Sep 7, 2023

It might be reasonable; at least we should make sure the sqlite we ship is compiled with extension loading enabled so that you can use the SQL function that loads extensions

@lidavidm
Copy link
Member

CC @ywc88

I think we should:

  • Add a new database option that corresponds to toggling sqlite3_enable_load_extension
  • Add a new database option whose value is a path that will be passed to sqlite3_load_extension
  • Add the option to the Python enum and add some unit tests
  • Possibly, subclass Connection in adbc_driver_sqlite.dbapi and add these two extension methods

@lidavidm lidavidm self-assigned this Oct 4, 2023
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Oct 30, 2023
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Oct 30, 2023
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Oct 30, 2023
vleslief-ms pushed a commit to vleslief-ms/arrow-adbc that referenced this issue Nov 9, 2023
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

Successfully merging a pull request may close this issue.

2 participants