db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6318) Simplify setting of possibly null parameters in XPLAIN descriptors
Date Thu, 29 Aug 2013 08:01:57 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13753413#comment-13753413
] 

ASF subversion and git services commented on DERBY-6318:
--------------------------------------------------------

Commit 1518534 from [~knutanders] in branch 'code/trunk'
[ https://svn.apache.org/r1518534 ]

DERBY-6318: Simplify setting of possibly null parameters in XPLAIN descriptors
                
> Simplify setting of possibly null parameters in XPLAIN descriptors
> ------------------------------------------------------------------
>
>                 Key: DERBY-6318
>                 URL: https://issues.apache.org/jira/browse/DERBY-6318
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Trivial
>         Attachments: d6318-1a.diff
>
>
> I noticed that the various XPLAIN descriptor classes need to set lots of numeric parameters
on a PreparedStatement, using the following idiom to allow null values:
>         if (parse_time != null)
>             ps.setLong(2, parse_time.longValue());
>         else
>             ps.setNull(2, Types.BIGINT);
> The same thing could have been achieved by using a single call to setObject(), like this:
>         ps.setObject(2, parse_time, Types.BIGINT);
> This would make the methods shorter and clearer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message