embulk-output-jdbc 0.7.9 → 0.7.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48a1142e7d456697b9e0d0c005cde55dec3d7084
4
- data.tar.gz: e7616b21132acca2bb8aeddbb4eb59f4a5ee5f8a
3
+ metadata.gz: 7c7fa14422899c7daafe8f6efc0d388e2215bcfb
4
+ data.tar.gz: 7ba49c9f0bd6a80440fdc653346031a9ba9dae63
5
5
  SHA512:
6
- metadata.gz: d45ff98b8f76f3c0c293a583e8a29a0a1bfb78c5d19f29dd217e129819f968280167dffcb973fd5772d6dae154f52ee1c03766e6a29e471a9fd757d8e337fa45
7
- data.tar.gz: 3a45ce034e613ba50a2361d5ccb6de5a9dc8588de7670ca4fa29bbc17ae2a495c6e24bfc41390f2b894d96514104585d2d5a5adc6744e8fdd7819b85954e243a
6
+ metadata.gz: 625e15875b281783d20f84acafc451bf84c98aace1f8e5943dcc25ce8757be992b2544b82da1a3f0e49c588129c033fb10f80d58ee85202db02812187d655795
7
+ data.tar.gz: 1437c98d6c6b98b044f10e9b74709769cdd090c26abe6b1bb068877619b43751518cd53bd5eeedf4fbfd88e20799130067352125c6491ae08fa1469fdbc1ada9
@@ -387,6 +387,7 @@ public abstract class AbstractJdbcOutputPlugin
387
387
  public void run() throws SQLException
388
388
  {
389
389
  JdbcOutputConnection con = newConnection(task, true, false);
390
+ con.showDriverVersion();
390
391
  try {
391
392
  doBegin(con, task, schema, taskCount);
392
393
  } finally {
@@ -9,6 +9,7 @@ import java.sql.PreparedStatement;
9
9
  import java.sql.ResultSet;
10
10
  import java.sql.SQLException;
11
11
  import java.sql.Statement;
12
+ import java.util.Locale;
12
13
 
13
14
  import org.slf4j.Logger;
14
15
 
@@ -19,7 +20,7 @@ import org.embulk.spi.Exec;
19
20
  public class JdbcOutputConnection
20
21
  implements AutoCloseable
21
22
  {
22
- private final Logger logger = Exec.getLogger(JdbcOutputConnection.class);
23
+ protected final Logger logger = Exec.getLogger(JdbcOutputConnection.class);
23
24
  protected final Connection connection;
24
25
  protected final String schemaName;
25
26
  protected final DatabaseMetaData databaseMetaData;
@@ -593,4 +594,9 @@ public class JdbcOutputConnection
593
594
  return ex;
594
595
  }
595
596
  }
597
+ public void showDriverVersion() throws SQLException {
598
+ DatabaseMetaData meta = connection.getMetaData();
599
+ logger.info(String.format(Locale.ENGLISH,"Using JDBC Driver %s",meta.getDriverVersion()));
600
+ }
601
+
596
602
  }
@@ -0,0 +1,37 @@
1
+ package org.embulk.output.jdbc;
2
+
3
+ import com.fasterxml.jackson.annotation.JsonCreator;
4
+ import com.fasterxml.jackson.annotation.JsonValue;
5
+
6
+ import org.embulk.config.ConfigException;
7
+
8
+ public enum Ssl
9
+ {
10
+ ENABLE,
11
+ DISABLE,
12
+ VERIFY;
13
+
14
+ @JsonValue
15
+ @Override
16
+ public String toString()
17
+ {
18
+ return this.name().toLowerCase();
19
+ }
20
+
21
+ @JsonCreator
22
+ public static Ssl fromString(String value)
23
+ {
24
+ switch(value) {
25
+ case "enable":
26
+ case "true":
27
+ return ENABLE;
28
+ case "disable":
29
+ case "false":
30
+ return DISABLE;
31
+ case "verify":
32
+ return VERIFY;
33
+ default:
34
+ throw new ConfigException(String.format("Unknown SSL value '%s'. Supported values are enable, true, disable, false or verify.", value));
35
+ }
36
+ }
37
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-jdbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.9
4
+ version: 0.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-23 00:00:00.000000000 Z
11
+ date: 2017-07-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Inserts or updates records to a table.
14
14
  email:
@@ -19,7 +19,7 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - README.md
21
21
  - build.gradle
22
- - classpath/embulk-output-jdbc-0.7.9.jar
22
+ - classpath/embulk-output-jdbc-0.7.10.jar
23
23
  - lib/embulk/output/jdbc.rb
24
24
  - src/main/java/org/embulk/output/JdbcOutputPlugin.java
25
25
  - src/main/java/org/embulk/output/jdbc/AbstractJdbcOutputPlugin.java
@@ -31,6 +31,7 @@ files:
31
31
  - src/main/java/org/embulk/output/jdbc/JdbcSchema.java
32
32
  - src/main/java/org/embulk/output/jdbc/JdbcUtils.java
33
33
  - src/main/java/org/embulk/output/jdbc/MergeConfig.java
34
+ - src/main/java/org/embulk/output/jdbc/Ssl.java
34
35
  - src/main/java/org/embulk/output/jdbc/StandardBatchInsert.java
35
36
  - src/main/java/org/embulk/output/jdbc/TableIdentifier.java
36
37
  - src/main/java/org/embulk/output/jdbc/TimestampFormat.java