ADBA feedback

Douglas Surber douglas.surber at oracle.com
Fri Apr 27 14:10:21 UTC 2018


Where is ADBA 1-based? I don’t think there are any other places where it uses indexes at all.

Douglas

> On Apr 27, 2018, at 3:02 AM, Mark Rotteveel <mark at lawinegevaar.nl> wrote:
> 
> 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