Better support for standardized `adbc_driver_manager.DatabaseOptions`
- Dominant language
- C#
- Stars
- 627
- Forks
- 217
- Avg merge
- 17h
- Merged PRs (30d)
- 57
Description
### What feature or improvement would you like to see?
While it is made clear that "not all drivers support all (database) options.", it would be useful to improve availability where a given parameter is applicable for the driver.
For example, I think all three of password, URI and username could be supported for PostgreSQL. URI for Snowflake also seems reasonable (although I am no Snowflake expert)
```python
>>> from adbc_driver_manager import DatabaseOptions
>>> import adbc_driver_snowflake
>>> import adbc_driver_postgresql
>>> sf_uri = "xxxxxxx"
>>> sf_database = adbc_driver_snowflake.connect(sf_uri)
>>> sf_database.get_option(DatabaseOptions.PASSWORD.value)
'xxx'
>>> sf_database.get_option(DatabaseOptions.URI.value)
Traceback (most recent call last):
File "", line 1, in
File "adbc_driver_manager/_lib.pyx", line 632, in adbc_driver_manager._lib.AdbcDatabase.get_option
File "adbc_driver_manager/_lib.pyx", line 261, in adbc_driver_manager._lib.check_error
adbc_driver_manager.ProgrammingError: NOT_FOUND: [Snowflake] Unknown database option 'uri'
>>> sf_database.get_option(DatabaseOptions.USERNAME.value)
'xxx'
>>> pg_uri = "postgresql://postgres:postgres@localhost:5433"
>>> pg_database = adbc_driver_postgresql.connect(pg_uri)
>>> pg_database.get_option(DatabaseOptions.PASSWORD.value)
Traceback (most recent call last):
File "", line 1, in
File "adbc_driver_manager/_lib.pyx", line 632, in adbc_driver_manager._lib.AdbcDatabase.get_option
File "adbc_driver_manager/_lib.pyx", line 261, in adbc_driver_manager._lib.check_error
adbc_driver_manager.ProgrammingError: NOT_FOUND
>>> pg_database.get_option(DatabaseOptions.URI.value)
Traceback (most recent call last):
File "", line 1, in
File "adbc_driver_manager/_lib.pyx", line 632, in adbc_driver_manager._lib.AdbcDatabase.get_option
File "adbc_driver_manager/_lib.pyx", line 261, in adbc_driver_manager._lib.check_error
adbc_driver_manager.ProgrammingError: NOT_FOUND
>>> pg_database.get_option(DatabaseOptions.USERNAME.value)
Traceback (most recent call last):
File "", line 1, in
File "adbc_driver_manager/_lib.pyx", line 632, in adbc_driver_manager._lib.AdbcDatabase.get_option
File "adbc_driver_manager/_lib.pyx", line 261, in adbc_driver_manager._lib.check_error
adbc_driver_manager.ProgrammingError: NOT_FOUND
Contributor guide
Research direction
Start with adbc_driver_manager.DatabaseOptions and the AdbcDatabase.get_option entry point, then inspect the PostgreSQL and Snowflake driver option handling mentioned in the examples. Compare which standardized options each driver exposes and add focused coverage for the agreed supported parameters, with get_option returning the expected values without NOT_FOUND errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100