ADBA feedback
Douglas Surber
douglas.surber at oracle.com
Tue May 1 20:12:15 UTC 2018
This is not intended as a solution to the id vs index issue, but rather as a proposal to address the question of case sensitivity etc.
Douglas
/**
* Return the value indicated by the {@code id}. The {@code id} may be either
* the id for an OUT parameter marker or for a column. See {@link OutOperation} and
* {@link RowOperation}.
*
* The interpretation of the id is implementation dependent. An implementation
* may interpret id in whatever way best supports the underlying database. For
* example an implementation may ignore case, may define special characters,
* or may impose specific syntax. An implementation could interpret the id
* as the decimal representation of an integer, or could ignore case unless
* the first and last characters of the id were double quotes. An implementation
* should interpret the id in whatever way best supports the underlying
* database with the least overhead to the implementation. An implementation
* must specify how the id is interpreted.
*
* @param <T> the type of the returned value
* @param id the id of the column or OUT parameter marker
* @param type the value indicated by {@code id} is converted to this type
* @return a value of type {@code T}
* @throws IllegalArgumentException if id is not the identifier of a value
* in this {@link ResultMap}
* @throws IllegalStateException if the call that was passed this {@link ResultMap} has
* ended
* @throws ClassCastException if the returned value cannot be converted to the
* specified type -- ISSUE: Not really a class cast. Maybe a new unchecked exception.
*/
public <T> T get(String id, Class<T> type);
> On May 1, 2018, at 4:47 AM, Lance Andersen <lance.andersen at oracle.com> wrote:
>
>
>> On May 1, 2018, at 7:37 AM, Mark Rotteveel <mark at lawinegevaar.nl> wrote:
>>
>> On 30-4-2018 18:25, Douglas Surber wrote:
>>> If there are several similar columns in sequence, then an off-by-one error may be difficult to detect. The redundant specification of the column makes it easier to detect such errors. While it allows runtime detection of errors, it doesn’t eliminate column counting and index shifting.
>>> With respect to case, I’d say the spec should be silent. Vendors can do whatever is appropriate for their database. For example Oracle Database would likely ignore case but would support case-sensitive double quoted identifiers, “\”lower case identifier with spaces\”’.
>>
>> I would really prefer if ADBA uses the same rules as JDBC, instead of just making this a free-for-all which will only lead to confusion and mismatches in expectations between drivers. Consistency is important.
>
> Yes, I agree something needs specified and as I mentioned in my previous email,
>
>
>>
>> Mark
>>
>> --
>> Mark Rotteveel
>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
>
>
>
More information about the jdbc-spec-discuss
mailing list