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-6742) For update statement, collect generated keys if Statement.RETURN_GENERATED_KEYS flag is supplied to the JDBC call.
Date Wed, 01 Oct 2014 04:28:34 GMT

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

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

Commit 1628596 from [~mamtas] in branch 'code/trunk'
[ https://svn.apache.org/r1628596 ]

DERBY-6742(For update statement, collect generated keys if Statement.RETURN_GENERATED_KEYS
flag is supplied to the JDBC call.)

This commit now allows JDBC statement to receive a resultset for auto generated keys for an
UPDATE statement updating the generated values with DEFAULT clause. Such a resultset will
be generated only if the UPDATE statement updated a single row and there were generated columns
involved in the update. This functionality already exists for INSERT statement. It is currently
implemented for INSERT statement by calling VALUES IDENTITY_VAL_LOCAL() from EmbedStatement.getGeneratedKeys().
I have used this existing mechanism to collect generated values resultset for UPDATE too.
This means that the scope of IDENTITY_VAL_LOCAL() function has grown from INSERT statement
to also include UPDATE statement. This will require us to update the documentation for IDENTITY_VAL_LOCAL().
I have created DERBY-6753(Docs for IDENTITY_VAL_LOCAL needs to be updated to indicate that
the return value will be impacted by single row UPDATE of identity column) for the documentation
task.

> For update statement, collect generated keys if Statement.RETURN_GENERATED_KEYS flag
is supplied to the JDBC call.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6742
>                 URL: https://issues.apache.org/jira/browse/DERBY-6742
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.12.0.0
>            Reporter: Mamta A. Satoor
>            Assignee: Mamta A. Satoor
>             Fix For: 10.12.0.0
>
>         Attachments: DERBY6742_patch1_diff.txt, DERBY6742_patch1_stat.txt
>
>
> DERBY-6414 is providing SQL support to update identity columns using DEFAULT keyword.
This jira will look into collecting generated keys if Statement.RETURN_GENERATED_KEYS flag
is supplied to the JDBC call for an UPDATE sql.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message