You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2018/10/03 05:02:00 UTC

[jira] [Resolved] (BEAM-5619) Fix minor bug in JdbcIO example code

     [ https://issues.apache.org/jira/browse/BEAM-5619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré resolved BEAM-5619.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.8.0

> Fix minor bug in JdbcIO example code
> ------------------------------------
>
>                 Key: BEAM-5619
>                 URL: https://issues.apache.org/jira/browse/BEAM-5619
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-jdbc
>            Reporter: Kengo Seki
>            Assignee: Kengo Seki
>            Priority: Trivial
>             Fix For: 2.8.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> There's a minor bug in JdbcIO Javadoc:
> {code}
> 127  * <pre>{@code
> 128  * pipeline
> 129  *   .apply(...)
> 130  *   .apply(JdbcIO.<KV<Integer, String>>write()
> 131  *      .withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(
> 132  *            "com.mysql.jdbc.Driver", "jdbc:mysql://hostname:3306/mydb")
> 133  *          .withUsername("username")
> 134  *          .withPassword("password"))
> 135  *      .withStatement("insert into Person values(?, ?)")
> 136  *      .withPreparedStatementSetter(new JdbcIO.PreparedStatementSetter<KV<Integer, String>>() {
> 137  *        public void setParameters(KV<Integer, String> element, PreparedStatement query)
> 138  *          throws SQLException {
> 139  *          query.setInt(1, kv.getKey());
> 140  *          query.setString(2, kv.getValue());
> 141  *        }
> 142  *      })
> 143  *    );
> 144  * }</pre>
> {code}
> {{kv}} at the line 139 and 140 should be {{element}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)