I have found these related issues/pull requests
Related to #3928 and the original addition in #3917
Description
I'm trying out the SQLite extension support using the 0.9.0-alpha.1 versions of sqlx and sqlx-cli.
I was previously getting errors about the config file sqlx.toml not parsing correctly. The config key was changed in #3928 but the example wasn't updated to match.
Current example:
[common.drivers.sqlite]
unsafe-load-extensions = ["/tmp/sqlite3-lib/ipaddr"]
But the section was updated to be:
[drivers.sqlite]
unsafe-load-extensions = ["/tmp/sqlite3-lib/ipaddr"]
After getting the extension loading working, the sqlx::query! and sqlx::query_as! macros would panic. Renaming the extension file to match the * in sqlite_*_init worked.
Could the sqlx.toml format expose an equivalent to extension_with_entrypoint as an option?
Prefered solution
- Update the example at
examples/sqlite/extension/sqlx.toml to match the actual format
- Allow an array of strings and objects under
drivers.sqlite.unsafe-load-extensions, possible example:
[drivers.sqlite]
unsafe-load-extensions = [
"/tmp/sqlite3-lib/ipaddr",
{ path = "/tmp/sqlite3-lib/ipaddr_renamed", entrypoint = "sqlite_ipaddr_init" }
]
Is this a breaking change? Why or why not?
I don't believe so, since the sqlx.toml format could still accept just a string in each entry of drivers.sqlite.unsafe-load-extensions to mean "use the default entrypoint based on the filename".
I have found these related issues/pull requests
Related to #3928 and the original addition in #3917
Description
I'm trying out the SQLite extension support using the
0.9.0-alpha.1versions ofsqlxandsqlx-cli.I was previously getting errors about the config file
sqlx.tomlnot parsing correctly. The config key was changed in #3928 but the example wasn't updated to match.Current example:
But the section was updated to be:
After getting the extension loading working, the
sqlx::query!andsqlx::query_as!macros would panic. Renaming the extension file to match the*insqlite_*_initworked.Could the
sqlx.tomlformat expose an equivalent toextension_with_entrypointas an option?Prefered solution
examples/sqlite/extension/sqlx.tomlto match the actual formatdrivers.sqlite.unsafe-load-extensions, possible example:Is this a breaking change? Why or why not?
I don't believe so, since the
sqlx.tomlformat could still accept just a string in each entry ofdrivers.sqlite.unsafe-load-extensionsto mean "use the default entrypoint based on the filename".