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

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

Kengo Seki created BEAM-5619:
--------------------------------

             Summary: 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


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)