[ https://issues.apache.org/jira/browse/METAMODEL-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15052524#comment-15052524 ]
ASF GitHub Bot commented on METAMODEL-6: ---------------------------------------- Github user LosD commented on the pull request: https://github.com/apache/metamodel/pull/77#issuecomment-163887640 It's a good point, but not critical IMHO, if you don't read the JavaDoc of the method (which is missing by the way... I have Internet on the plane, so I finally had a chance to take a look :)), you brought it on yourself... But if nothing else dictates int, we might as well make it clear by using null. > Get back update status after invoking executeUpdate(...) > -------------------------------------------------------- > > Key: METAMODEL-6 > URL: https://issues.apache.org/jira/browse/METAMODEL-6 > Project: Apache MetaModel > Issue Type: Wish > Reporter: Kasper Sørensen > Assignee: Kasper Sørensen > Priority: Minor > > 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 > available. > 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 (v6.3.4#6332)