metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LosD <>
Subject [GitHub] metamodel pull request #153: Collections instead of Arrays
Date Fri, 28 Jul 2017 11:58:31 GMT
Github user LosD commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/metamodel/ ---
    @@ -103,7 +103,10 @@ private Row update(final Row original) {
             final DataContext dc = _updateCallback.getDataContext();
             final Table table = getTable();
             final List<FilterItem> whereItems = getWhereItems();
    -        final DataSet dataSet = dc.query().from(table).select(table.getColumns()).where(whereItems).execute();
    +        final DataSet dataSet = dc.query()
    +                .from(table)
    +                .select(table.getColumns().toArray(new Column[table.getColumns().size()]))
    --- End diff --
    This is a bit of a shame. No good way to avoid the extra `toArray()`? It seems you added
an overriden method to `Query` that does the same, but I might be missing something here.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message