nishantchandraa opened a new pull request, #4286:
URL: https://github.com/apache/arrow-adbc/pull/4286
## Summary
This PR introduces an initial C/C++ ADBC driver for IBM Db2, intentionally
scoped to **connection management only** so maintainers can review a small,
focused baseline.
### Included in this PR
- New Db2 driver skeleton integrated into C/C++ build and packaging wiring
- CMake option and subdirectory integration
- Meson integration
- Driver config and pkg-config metadata
- DB2 database/connection lifecycle implementation
- Database init/release (`SQLHENV` management)
- Connection init/release (`SQLHDBC` allocation, connect, disconnect)
- Default autocommit behavior on connection init
- Connection option handling
- `uri` support
- per-field options: database, hostname, port, uid, pwd
- standard `username` / `password` synonyms
- explicit precedence: `uri` overrides conflicting per-field options
- Connection-level validation/error behavior
- malformed port rejected (`1-65535` required)
- empty UID/PWD rejected
- SQLSTATE-to-ADBC status mapping for connection/auth failures
- Minimal connection-focused tests and docs
- lifecycle and concurrent-connection flow
- missing/unknown option handling
- invalid credentials handling
- unreachable endpoint mapping
- option precedence and validation behavior
- DB2 driver docs + index inclusion
### Explicitly out of scope
- Statement execution
- Result fetching/cursor handling
- Metadata APIs (`GetInfo`, `GetObjects`, schemas/catalog)
- Transaction APIs beyond default connection behavior
- Bulk ingest and advanced type mapping
- Performance optimizations
## Validation
Tested against a live Db2 instance on `localhost:50000`:
- `adbc-driver-db2-test`: **15/15 passed**
- `ctest -L driver-db2`: **pass**
Coverage includes:
- database/connection init+release
- autocommit default and concurrent connection flow
- invalid credentials
- malformed port
- empty UID/PWD
- unreachable host/port error mapping
- `uri` precedence over per-field options
## Notes for reviewers
This PR is intentionally narrow to establish a clean, reviewable baseline
for DB2 support in ADBC. Follow-up PRs will add statement execution, metadata,
transaction functionality, and broader feature parity incrementally.
--
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]