What feature or improvement would you like to see?
As we develop drivers for various data sources, we find that consumers of the driver not only need a reliable API, but also reliable metadata results to make consuming different drivers less data source specific.
While consumers can use GetTableSchema, it may not provide enough information about the data source's unique column properties.
So consumers will use GetObjects to get more information about the native metadata of the data source. However, there is a large amount of flexibility afforded the values in the COLUMN_SCHEMA structure.
/// 3. Optional value. Should be null if not supported by the driver.
/// xdbc_ values are meant to provide JDBC/ODBC-compatible metadata
/// in an agnostic manner.
I'd like to propose a more restrictive or suggestive description of the field contents so that consuming this information can be more portable. I believe the "agnostic manner" intention is to use JDBC/ODBC values, if possible. Or reading into this more, values that can be reliable understood by the consumer of the call. The other possibility is to add new fields to the structure which would follow more restrictive specifications.
Examples:
xdbc_type_name should contain string values taken from either or both the JDBC JDBCType enumeration or ODBC identifiers - in a ADBC defined list of acceptable values.
xdbc_data_type and xdbc_sql_data_type are not clearly defined nor is their difference (if any). It could be that xdbc_data_type is defined by the JDBC values and xdbc_sql_data_type could be defined by the ODBC values.
Still, carrying around these legacy value is not ideal and we should likely associate an ADBC-defined value to one or both of these two fields
xdbc_nullable as int16 - should be explicitly defined as 0 (not nullable) and 1 (nullable) and 2 (unknown) or null (unsupported by data source)
xdbc_is_nullable - should be explicitly defined as "NO", "YES", "" (unknown) or null (unsupported by data source)
The result of this discussion should be
- Improved documentation on allowable values
- Tests in each driver to confirm values are in scope.
What feature or improvement would you like to see?
As we develop drivers for various data sources, we find that consumers of the driver not only need a reliable API, but also reliable metadata results to make consuming different drivers less data source specific.
While consumers can use
GetTableSchema, it may not provide enough information about the data source's unique column properties.So consumers will use GetObjects to get more information about the native metadata of the data source. However, there is a large amount of flexibility afforded the values in the COLUMN_SCHEMA structure.
I'd like to propose a more restrictive or suggestive description of the field contents so that consuming this information can be more portable. I believe the "agnostic manner" intention is to use JDBC/ODBC values, if possible. Or reading into this more, values that can be reliable understood by the consumer of the call. The other possibility is to add new fields to the structure which would follow more restrictive specifications.
Examples:
xdbc_type_nameshould contain string values taken from either or both the JDBC JDBCType enumeration or ODBC identifiers - in a ADBC defined list of acceptable values.xdbc_data_typeandxdbc_sql_data_typeare not clearly defined nor is their difference (if any). It could be thatxdbc_data_typeis defined by the JDBC values andxdbc_sql_data_typecould be defined by the ODBC values.Still, carrying around these legacy value is not ideal and we should likely associate an ADBC-defined value to one or both of these two fields
xdbc_nullableas int16 - should be explicitly defined as0(not nullable) and1(nullable) and2(unknown) ornull(unsupported by data source)xdbc_is_nullable- should be explicitly defined as"NO","YES",""(unknown) ornull(unsupported by data source)The result of this discussion should be