[ http://issues.apache.org/jira/browse/DERBY-2139?page=all ]

Daniel John Debrunner updated DERBY-2139:
-----------------------------------------

    Attachment: d2139_getXXX_draft.txt

Patch which changes the api for Row.getColumn() and its implementations. Only 
changes one of the callers, EmbedResultSet.getColumn().

A complete patch would need to investigate all callers of Row.getColumn() to 
ensure they handle the IndexOutOfBoundsException correctly.

Is a patch to show the idea and to allow performance testing related to 
DERBY-1876

> executing getXXX() for a column checks the column position is in range three 
> times, reduce to one.
> --------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2139
>                 URL: http://issues.apache.org/jira/browse/DERBY-2139
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC, SQL, Performance
>            Reporter: Daniel John Debrunner
>            Priority: Minor
>         Attachments: d2139_getXXX_draft.txt
>
>
> On a getXXX() method the column position is checked in:
> Once in EmbedResultSet.getColumn()
> Twice in ValueRow.getColumn()
>   - once using explict code
>   - once implicitly when accessing the DataValueDescriptor array
> Can reduce to once by solely relying on the array bounds checking. Then 
> change the defined api to Row.getColumn to state that it throws 
> IndexOutOfBoundsException for an invalid column. EmbedResultSet.getColumn() 
> then can catch that exception and throw the required SQLException.
> Probably need similar changes on the setXXX() methods and other getXXX 
> methods and need to see how Row.getColumn() is used within the language layer.
>    

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to