Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi everyone,

The definition of XRowLocate::findColumn, and its implementations, all
seem to be slightly confused.

XRowLocate doesn't specify what should happen what happens if findColumn
is called for an invalid column name. Currently some drivers return -1,
some drivers return the number of columns + 1 (they loop over all the
columns and don't check for this case). A number of implementations
actually have comments to the effect that they should return -1 or throw
an Exception.

In the case of JDBC drivers: the JDBC specification states that an
SQLException should be thrown in this case. This is therefore probably
what happens with any JDBC driver since findColumn is just passed
directly to JDBC (this also includes the HSQLDB driver which runs via
JDBC).

This means that any user of findColumn has to expect either an exception
or various invalid numerical values. (IMHO the Exception is most correct
and is what I've done for now with the Firebird driver.)

Is it OK if I rewrite the specification of findColumn to mirror that of
the JDBC specification, perhaps with a note that some drivers may still
return invalid values instead? (Of course I'd also upgrade all the
drivers to reflect the new specification -- so this note would only
apply to any external drivers -- are there any?)

Cheers,

        Andrzej


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.