ADBA feedback
Mark Rotteveel
mark at lawinegevaar.nl
Mon Apr 30 08:59:14 UTC 2018
On 30-4-2018 10:35, Lukas Eder wrote:
>
>
> 2018-04-30 10:28 GMT+02:00 Mark Rotteveel <mark at lawinegevaar.nl
> <mailto:mark at lawinegevaar.nl>>:
>
>
> Retrieval by column label in JDBC is case insensitive by
> specification, and I think that ADBA should maintain that. That is
> irrespective if the label was originally case sensitive or not.
>
>
> Interesting, thanks I wasn't aware of that (you see, I've never really
> used the API) :)
Not sure if you're joking or not :|
> So, in the event of a query like this:
>
> SELECT 1 AS "A", 2 AS "a"
>
> In JDBC, the index-based API is the only one that works, despite the
> query being correct SQL, producing two explicitly distinct column names
> (even if that's an edge case).
Yes, and in JDBC that is also in the specification :):
"""
Column names used as input to getter methods are case insensitive. When
a getter method is called with a column name and several columns have
the same name, the value of the first matching column will be returned.
The column name option is designed to be used when column names are used
in the SQL query that generated the result set. For columns that are NOT
explicitly named in the query, it is best to use column numbers. If
column names are used, the programmer should take care to guarantee that
they uniquely refer to the intended columns, which can be assured with
the SQL AS clause.
"""
--
Mark Rotteveel
More information about the jdbc-spec-discuss
mailing list