zeroshade opened a new pull request, #4957:
URL: https://github.com/apache/arrow-adbc/pull/4957
The Go driver manager wrapper implemented string `SetOption` on Database,
Connection and Statement but had no option getters, so Go callers couldn't read
driver state through `adbc.GetSetOptions`, e.g. `adbc.connection.catalog` /
`adbc.connection.db_schema`.
This PR implements `adbc.GetSetOptions` on all three handle types, backed by
the C `Adbc{Database,Connection,Statement}{Get,Set}Option{,Bytes,Int,Double}`
functions:
- The string and bytes getters follow the ADBC 1.1 length protocol: if the
128-byte initial buffer is too short, they grow to the reported length and
retry once. String results drop the NUL terminator.
- Driver errors (NotFound, NotImplemented, ...) keep their status.
- Before a Database is initialized, `GetOption` returns options stored
through `SetOptions`.
- Adds SQLite-backed tests for an autocommit round-trip, unknown-key
statuses, the typed accessors, and the grow-and-retry path (via a long database
URI). SQLite exposes no readable bytes option, so the bytes getter isn't
exercised by a test.
Related: #4955 (ExecuteSchema and context cancellation for the same wrapper).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]