You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2014/09/25 08:03:33 UTC
[jira] [Updated] (DERBY-6742) For update statement, collect
generated keys if Statement.RETURN_GENERATED_KEYS flag is supplied to the
JDBC call.
[ https://issues.apache.org/jira/browse/DERBY-6742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mamta A. Satoor updated DERBY-6742:
-----------------------------------
Attachment: DERBY6742_patch1_stat.txt
DERBY6742_patch1_diff.txt
Attaching patch for review. This now allows JDBC statement to receive a resultset for auto generated keys for an UPDATE statement updating the generated values with DEFAULT clause. Prior to this, we always returned a null resultset. Such a resultset will now 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 calling VALUES IDENTITY_VAL_LOCAL() from EmbedStatement.getGeneratedKeys(). I have used this existing mechanism to collect generated values resultset for UPDATE. 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 will create a new jira for it. Thanks.
> 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
> 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)