You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/06/02 10:29:37 UTC

[GitHub] [beam] Amar3tto commented on a change in pull request #14856: [BEAM-11873] Add support for writes with returning values in JdbcIO

Amar3tto commented on a change in pull request #14856:
URL: https://github.com/apache/beam/pull/14856#discussion_r643829684



##########
File path: sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -1070,15 +1070,32 @@ public static RetryConfiguration create(
      *
      * <pre>{@code
      * PCollection<Void> firstWriteResults = data.apply(JdbcIO.write()
-     *     .withDataSourceConfiguration(CONF_DB_1).withResults());
+     *     .withDataSourceConfiguration(CONF_DB_1).withVoidResults());
      * data.apply(Wait.on(firstWriteResults))
      *     .apply(JdbcIO.write().withDataSourceConfiguration(CONF_DB_2));
      * }</pre>
      */
-    public WriteVoid<T> withResults() {
+    public WriteVoid<T> withVoidResults() {
       return inner;
     }
 
+    /**
+     * Returns {@link WriteWithResults} transform that could return a specific result.
+     *
+     * <p>See {@link WriteWithResults}
+     */
+    public <V> WriteWithResults<T, V> withReturningResults(RowMapper<V> rowMapper) {

Review comment:
       It is a good question. I thought about this: `withVoidResults` -> `withoutResults`. But initially, this method was named `withResults`, because we can wait on such results even if they are Void.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org