fix(rust/core): add InfoCode::Other to handle arbitrary codes#4510
Open
fornwall wants to merge 1 commit into
Open
fix(rust/core): add InfoCode::Other to handle arbitrary codes#4510fornwall wants to merge 1 commit into
fornwall wants to merge 1 commit into
Conversation
`InfoCode` was a closed set of the 11 standard codes, so requests for XDBC-range ([500, 1_000)) or vendor-specific (>= 10_000) info codes could not be represented: the FFI exporter errored on unknown values before the wrapped Rust driver was called, and the JavaScript client dropped them before the driver manager forwarded the request to the loaded driver. A driver could still emit such codes when asked for everything (`info_codes` == `None`), so a vendor code would appear in "fetch all" results but could not be requested explicitly. Add an `InfoCode::Other(u32)` catch-all variant (mirroring the existing `Other` variants on `OptionDatabase`/`OptionConnection`/`OptionStatement`) so codes survive the u32 round-trip, and pass requested codes through unfiltered in both the FFI exporter and the JavaScript client, leaving "ignore unrecognized codes" to the driver as adbc.h states: > Drivers/vendors will ignore requests for unrecognized codes > (the row will be omitted from the result) Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
lidavidm
reviewed
Jul 13, 2026
lidavidm
left a comment
Member
There was a problem hiding this comment.
Seems reasonable enough. CC @eitsupi @felipecrv too.
Contributor
|
Looks good, thanks. |
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.
InfoCodewas a closed set of the 11 standard codes, so requests for XDBC-range ([500, 1000)) or vendor-specific (>= 10000) info codes could not be represented: the FFI exporter errored on unknown values before the wrapped Rust driver was called, and the JavaScript client dropped them before the driver manager forwarded the request to the loaded driver.A driver could still emit such codes when asked for everything (
info_codes==None), so a vendor code would appear in "fetch all" results but could not be requested explicitly.Add an
InfoCode::Other(u32)catch-all variant (mirroring the existingOthervariants onOptionDatabase/OptionConnection/OptionStatement) so codes survive the u32 round-trip, and pass requested codes through unfiltered in both the FFI exporter and the JavaScript client, leaving "ignore unrecognized codes" to the driver as adbc.h states: