Repository navigation
connection: expose simple connect settings and read consistency - #152
Merged
Merged
Conversation
Add consuming ConnectBuilder setters for the SDK API key, region, host and SQL host overrides, namespace client properties, manifest mode, and a millisecond read consistency interval. Expose the SDK read consistency through a typed C result that distinguishes manual, strong, and eventual modes. Extend the C++ and C17 consumers to cover unset, zero, positive and invalid inputs. Remote enterprise connections are checked for the SDK's NotSupported read-consistency result and configuration rejections without contacting a backend. Refs #124
Store the SDK remote dispatch classification on the opaque connect builder and gate the dedicated remote setters on it. A native connection no longer receives the API key, region, or host overrides through its native storage options map. Use the SDK's db-prefix dispatch so malformed remote URIs still reach SDK validation. Extend the consumers with native secret absence, valid db:// root forwarding, and malformed URI error checks. Correct the region, SQL host, and read consistency documentation for native and remote behavior. Refs #124
Keep all four public C setters available in no-default builds. The remote SDK method binding is selected by the C crate's remote feature; without it, the setters still consume and validate their inputs and return the builder, while execution keeps the SDK's remote-disabled error path. Correct the native background-refresh and remote pinned-snapshot documentation, and gate the remote-only Rust probes so native and no-remote contracts remain testable. Refs #124
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.
Adds the simple existing
ConnectBuildersetters for this #124 slice:0selects strong consistency, and a positive value selects eventual consistencylancedb_connection_read_consistencyintrospection backed byConnection::read_consistencyThe new C result type distinguishes manual, strong, and eventual modes and reports the eventual interval in whole milliseconds. On failure, the output is unchanged; remote Enterprise connections surface the SDK's
NotSupportedresult.This slice does not add bulk HTTP
ClientConfig,connect_namespace, AWS credential/provider changes, or create/open options. Existing builder setters and entry points keep their contracts.Validation on the exact head:
cargo check --locked, strict Clippy, host and MSVC LLP64 ABI checks (184 functions, 32 structs, 8 enums), strict C17 source-header compilation, and the connection CTest under Valgrind plus the C17 consumer. The C++ tests cover unset, zero, positive, invalid strings, manifest-enabled local connections, and remote SDK rejection/NotSupportedpaths without contacting a backend.Refs #124. The issue remains open for the remaining connection slices.