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_EXTENSIONS environment variable should be DATASETTE_LOAD_EXTENSION #2424

Closed
simonw opened this issue Sep 9, 2024 · 4 comments
Closed

Comments

@simonw
Copy link
Owner

simonw commented Sep 9, 2024

Spotted in:

fn = click.option(
"sqlite_extensions",
"--load-extension",
type=LoadExtension(),
envvar="SQLITE_EXTENSIONS",
multiple=True,
help="Path to a SQLite extension to load, and optional entrypoint",
)(fn)

It's inconsistent with our other environment variables, which all use the DATASETTE_ prefix.

@simonw
Copy link
Owner Author

simonw commented Sep 9, 2024

SQLITE_EXTENSIONS was never mentioned in our documentation, so this is a very minor breaking change (and good for pre-1.0).

@simonw simonw changed the title SQLITE_EXTENSIONS environment variable should be DATASETTE_SQLITE_EXTENSIONS SQLITE_EXTENSIONS environment variable should be DATASETTE_LOAD_EXTENSION Sep 9, 2024
@simonw
Copy link
Owner Author

simonw commented Sep 9, 2024

Actually DATASETTE_LOAD_EXTENSION is a better name, it matches the --load-extension option.

@simonw
Copy link
Owner Author

simonw commented Sep 9, 2024

Tested like this:

DATASETTE_LOAD_EXTENSION=spatialite datasette --get /-/versions.json

Returned ... {"spatialite_version": "5.1.0", "spatialite_target_cpu": "arm64-apple-darwin22.4.0"...

@simonw
Copy link
Owner Author

simonw commented Sep 9, 2024

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

No branches or pull requests

1 participant