Skip to content

Support typed configuration options #159

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

Merged
merged 1 commit into from
Mar 17, 2025
Merged

Conversation

staticlibs
Copy link
Collaborator

This change adds support for all primitive types (and additionally for a list of strings) for configuration values that can be passed to DriverManager.getConnection(url, conf).

To be able to handle config in a separate compilation unit, cached references and common utilities are moved to separate files. There are a few more check added to the Java references collection code, but it still kept largely the same.

Additionally the file_system field of the DBConfig is filled manually, it was necessary because this field is used for checks when incoming file-system related options are set.

Testing: new test added that sets typed config values and checks that they are set with current_setting().

Fixes: #137

This change adds support for all primitive types (and additionally for
a list of strings) for configuration values that can be passed to
`DriverManager.getConnection(url, conf)`.

To be able to handle config in a separate compilation unit, cached
references and common utilities are moved to separate files. There are
a few more check added to the Java references collection code, but it
still kept largely the same.

Additionally the `file_system` field of the `DBConfig` is filled
manually, it was necessary because this field is used for checks when
incoming file-system related options are set.

Testing: new test added that sets typed config values and checks that
they are set with `current_setting()`.

Fixes: duckdb#137
@Mytherin Mytherin merged commit 87a2cab into duckdb:main Mar 17, 2025
7 checks passed
@Mytherin
Copy link
Contributor

Thanks!

@staticlibs staticlibs deleted the typed_config branch March 17, 2025 12:03
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 this pull request may close these issues.

[v1.2.0] Failed to set configuration option "allowed_directories", error: Attempted to dereference unique_ptr that is NULL!
2 participants