ADBA feedback
Mark Rotteveel
mark at lawinegevaar.nl
Fri Apr 27 10:02:17 UTC 2018
On 26-4-2018 22:44, Douglas Surber wrote:
>> 6) Why is Row.rowNumber() zero based? That's very confusing. E.g. Row.get()
>> is still 1-based, and all SQL databases that support either ROWNUM or
>> ROW_NUMBER() OVER () functions will produce 1-based row numbers
>
> Because everything else in Java is zero based. If the consensus is to change this, that’s fine with me.
Given JDBC is 1-based, the SQL standard is 1-based, and other parts of
ADBA are also 1-based, I think following the principle of least surprise
and use 1-based here as well would be a better choice.
The only part where this runs afoul is things like
`Result.getIdentifiers` returning a (0-based) array. Maybe add an
explicit warning about it being 0-based there.
The alternative would be to make the whole of ADBA 0-based, but that is
likely more confusing for people used to JDBC and SQL 1-based behavior.
Mark
--
Mark Rotteveel
More information about the jdbc-spec-discuss
mailing list