metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (METAMODEL-6) Get back update status after invoking executeUpdate(...)
Date Sat, 02 Jan 2016 21:01:39 GMT


ASF GitHub Bot commented on METAMODEL-6:

GitHub user kaspersorensen opened a pull request:

    METAMODEL-6: Added UpdateSummary building for JDBC module

    Some more progress on METAMODEL-6. This adds support for the JDBC module to return number
of inserts, updates, deletes and any generated keys. I chose the JDBC module because it is
arguably the most complex. I imagine the reusing bits and pieces from here would be beneficial
when implementing support in some of the other modules.

You can merge this pull request into a Git repository by running:

    $ git pull METAMODEL-6/execute-update-return-value

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #84
commit d888907b3b27d821e0b8fd9291987e9b56e44c68
Author: Kasper Sørensen <>
Date:   2016-01-02T20:59:14Z

    METAMODEL-6: Added UpdateSummary building for JDBC module


> Get back update status after invoking executeUpdate(...)
> --------------------------------------------------------
>                 Key: METAMODEL-6
>                 URL:
>             Project: Apache MetaModel
>          Issue Type: Wish
>            Reporter: Kasper Sørensen
>            Assignee: Kasper Sørensen
>            Priority: Minor
>             Fix For: 5.0.0
> In the current API design of MetaModel, the DataContext.executeUpdate(...) method is
a void method. This was initially chosen because not all implementations have the capability
to report anything about a particular update. But some do, for instance the no. of inserted,
updated or deleted records from a JDBC call. It would be nice to expose this information when
> My suggestion for this would be to let the DataContext.executeUpdate(...) method return
an object with this information. All methods on the new object type would be optionally returning
null, if no information is available. But when available, we can at least expose it this way.
> The change wouldn't have a major impact, since any project using MetaModel would already
need to recompile because of the namespace change to org.apache.metamodel. And the change
would be compile-time compatible with having a void return type.

This message was sent by Atlassian JIRA

View raw message