ADBA feedback
Mark Rotteveel
mark at lawinegevaar.nl
Fri Apr 27 09:52:50 UTC 2018
On 26-4-2018 22:44, Douglas Surber wrote:
>> Design concerns:
>> -------------------------
>>
>> 1) Result.Row should have better methods akin to what JDBC's
>> ResultSetMetaData (RSMD) has. For instance:
>> o It's currently not possible to discover individual column types
>> o The getIdentifiers() array corresponds to the RSMD.getColumnName()
>> values, but what about qualification of columns? What about
>> RSMD.getColumnLabel()?
>> o Nullability flags may be cool too. Not sure about the other info in RSMD
>
> This is an intentional design choice for version 1. ADBA is targeted at high throughput apps. Metadata is slow. We intentionally omitted almost all metadata at least from V1 as we did not think it was an absolute requirement for the target use cases. If there are target use cases where metadata is critical we can revisit that decision, but we would prefer to defer that to version 2.
I haven't looked at ADBA closely and even less at AoJ, but
getIdentifiers() is currently returning the value of
ResultSetMetaData.getColumnName(..), and that is a bug.
In JDBC, the column name is the name of the underlying column (if any),
while the column label is the alias if present or otherwise the name of
the underlying column. The JDBC column label is what most 'normal'
people would call the name of the column in the result set.
In short, AoJ should use getColumnLabel, because the label and not the
name is what is also used in JDBC to retrieve columns from a result set,
see JDBC ResultSet javadoc (getString(String))
https://docs.oracle.com/javase/10/docs/api/java/sql/ResultSet.html#getString(java.lang.String):
"""
Parameters:
columnLabel - the label for the column specified with the SQL AS
clause. If the SQL AS clause was not specified, then the label is the
name of the column
"""
This seems to be a repeat of the historic JDBC confusion of the meaning
of result set column name and column label.
Mark
--
Mark Rotteveel
More information about the jdbc-spec-discuss
mailing list