Repository navigation
Conversation
AdbcReader now keeps the resolved &'static DatabaseEntry instead of just the peeled-off AdbcInfo, so quirk access goes through the entry and the double registry lookup in from_connection_string collapses to one. OdbcReader resolves the registry entry once per connection and derives both the dialect and fetch behavior (batch size, numeric-as-double) from it, replacing the separate detect_or_err / detect calls. Adds registry::detect_entry_or_err for callers that need the full entry. First step of #575.
Adds DatabaseEntry::odbc_credential_provider, a pre-connect hook that rewrites the ODBC connection string. The Snowflake entry points it at a single apply_workbench_credentials() in odbc/snowflake.rs, and the two is_snowflake() string-match call sites in from_odbc_conn_str collapse into one registry-dispatched invocation keyed on the Driver= value. is_snowflake() itself is removed — its matching is subsumed by registry detection. Closes the remaining item of #575.
registry.rs is compiled unconditionally, but odbc::snowflake only exists with the odbc cargo feature, so the unconditional reference broke no-default-features builds (CI). Reference the hook through a cfg-gated constant instead; without the feature the entry simply has no provider.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #575
This is a follow-up to #569 addressing some concerns that came up but were pushed due to the already humonguous size of the PR
In short, it moves more logic into the registry, avoiding to keep weird driver quirks scattered throughout the codebase