embulk-output-jdbc 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/build.gradle +2 -2
- data/classpath/{embulk-output-jdbc-0.2.3.jar → embulk-output-jdbc-0.2.4.jar} +0 -0
- data/lib/embulk/output/jdbc.rb +3 -3
- data/src/main/java/org/embulk/output/JdbcOutputPlugin.java +120 -120
- data/src/main/java/org/embulk/output/jdbc/AbstractJdbcOutputPlugin.java +755 -756
- data/src/main/java/org/embulk/output/jdbc/BatchInsert.java +54 -54
- data/src/main/java/org/embulk/output/jdbc/JdbcOutputConnector.java +8 -8
- data/src/main/java/org/embulk/output/jdbc/JdbcSchema.java +37 -37
- data/src/main/java/org/embulk/output/jdbc/JdbcUtils.java +155 -155
- data/src/main/java/org/embulk/output/jdbc/RetryExecutor.java +105 -105
- data/src/main/java/org/embulk/output/jdbc/setter/BooleanColumnSetter.java +52 -52
- data/src/main/java/org/embulk/output/jdbc/setter/ColumnSetterFactory.java +137 -137
- data/src/main/java/org/embulk/output/jdbc/setter/DoubleColumnSetter.java +51 -51
- data/src/main/java/org/embulk/output/jdbc/setter/LongColumnSetter.java +62 -62
- data/src/main/java/org/embulk/output/jdbc/setter/NullColumnSetter.java +43 -43
- data/src/main/java/org/embulk/output/jdbc/setter/SkipColumnSetter.java +38 -38
- data/src/main/java/org/embulk/output/jdbc/setter/SqlTimestampColumnSetter.java +48 -48
- data/src/main/java/org/embulk/output/jdbc/setter/StringColumnSetter.java +48 -48
- data/src/test/java/org/embulk/output/TestJdbcOutputPlugin.java +5 -5
- metadata +3 -3
@@ -1,48 +1,48 @@
|
|
1
|
-
package org.embulk.output.jdbc.setter;
|
2
|
-
|
3
|
-
import java.io.IOException;
|
4
|
-
import java.sql.SQLException;
|
5
|
-
import org.embulk.spi.ColumnVisitor;
|
6
|
-
import org.embulk.spi.PageReader;
|
7
|
-
import org.embulk.spi.time.Timestamp;
|
8
|
-
import org.embulk.spi.time.TimestampFormatter;
|
9
|
-
import org.embulk.output.jdbc.JdbcColumn;
|
10
|
-
import org.embulk.output.jdbc.BatchInsert;
|
11
|
-
|
12
|
-
public class StringColumnSetter
|
13
|
-
extends ColumnSetter
|
14
|
-
{
|
15
|
-
private final TimestampFormatter timestampFormatter;
|
16
|
-
|
17
|
-
public StringColumnSetter(BatchInsert batch, PageReader pageReader,
|
18
|
-
JdbcColumn column, TimestampFormatter timestampFormatter)
|
19
|
-
{
|
20
|
-
super(batch, pageReader, column);
|
21
|
-
this.timestampFormatter = timestampFormatter;
|
22
|
-
}
|
23
|
-
|
24
|
-
protected void booleanValue(boolean v) throws IOException, SQLException
|
25
|
-
{
|
26
|
-
batch.setString(Boolean.toString(v));
|
27
|
-
}
|
28
|
-
|
29
|
-
protected void longValue(long v) throws IOException, SQLException
|
30
|
-
{
|
31
|
-
batch.setString(Long.toString(v));
|
32
|
-
}
|
33
|
-
|
34
|
-
protected void doubleValue(double v) throws IOException, SQLException
|
35
|
-
{
|
36
|
-
batch.setString(Double.toString(v));
|
37
|
-
}
|
38
|
-
|
39
|
-
protected void stringValue(String v) throws IOException, SQLException
|
40
|
-
{
|
41
|
-
batch.setString(v);
|
42
|
-
}
|
43
|
-
|
44
|
-
protected void timestampValue(Timestamp v) throws IOException, SQLException
|
45
|
-
{
|
46
|
-
batch.setString(timestampFormatter.format(v));
|
47
|
-
}
|
48
|
-
}
|
1
|
+
package org.embulk.output.jdbc.setter;
|
2
|
+
|
3
|
+
import java.io.IOException;
|
4
|
+
import java.sql.SQLException;
|
5
|
+
import org.embulk.spi.ColumnVisitor;
|
6
|
+
import org.embulk.spi.PageReader;
|
7
|
+
import org.embulk.spi.time.Timestamp;
|
8
|
+
import org.embulk.spi.time.TimestampFormatter;
|
9
|
+
import org.embulk.output.jdbc.JdbcColumn;
|
10
|
+
import org.embulk.output.jdbc.BatchInsert;
|
11
|
+
|
12
|
+
public class StringColumnSetter
|
13
|
+
extends ColumnSetter
|
14
|
+
{
|
15
|
+
private final TimestampFormatter timestampFormatter;
|
16
|
+
|
17
|
+
public StringColumnSetter(BatchInsert batch, PageReader pageReader,
|
18
|
+
JdbcColumn column, TimestampFormatter timestampFormatter)
|
19
|
+
{
|
20
|
+
super(batch, pageReader, column);
|
21
|
+
this.timestampFormatter = timestampFormatter;
|
22
|
+
}
|
23
|
+
|
24
|
+
protected void booleanValue(boolean v) throws IOException, SQLException
|
25
|
+
{
|
26
|
+
batch.setString(Boolean.toString(v));
|
27
|
+
}
|
28
|
+
|
29
|
+
protected void longValue(long v) throws IOException, SQLException
|
30
|
+
{
|
31
|
+
batch.setString(Long.toString(v));
|
32
|
+
}
|
33
|
+
|
34
|
+
protected void doubleValue(double v) throws IOException, SQLException
|
35
|
+
{
|
36
|
+
batch.setString(Double.toString(v));
|
37
|
+
}
|
38
|
+
|
39
|
+
protected void stringValue(String v) throws IOException, SQLException
|
40
|
+
{
|
41
|
+
batch.setString(v);
|
42
|
+
}
|
43
|
+
|
44
|
+
protected void timestampValue(Timestamp v) throws IOException, SQLException
|
45
|
+
{
|
46
|
+
batch.setString(timestampFormatter.format(v));
|
47
|
+
}
|
48
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
package org.embulk.output;
|
2
|
-
|
3
|
-
public class TestJdbcOutputPlugin
|
4
|
-
{
|
5
|
-
}
|
1
|
+
package org.embulk.output;
|
2
|
+
|
3
|
+
public class TestJdbcOutputPlugin
|
4
|
+
{
|
5
|
+
}
|
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.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Inserts or updates records to a table.
|
14
14
|
email:
|
@@ -39,7 +39,7 @@ files:
|
|
39
39
|
- src/main/java/org/embulk/output/jdbc/setter/SqlTimestampColumnSetter.java
|
40
40
|
- src/main/java/org/embulk/output/jdbc/setter/StringColumnSetter.java
|
41
41
|
- src/test/java/org/embulk/output/TestJdbcOutputPlugin.java
|
42
|
-
- classpath/embulk-output-jdbc-0.2.
|
42
|
+
- classpath/embulk-output-jdbc-0.2.4.jar
|
43
43
|
homepage: https://github.com/embulk/embulk-output-jdbc
|
44
44
|
licenses:
|
45
45
|
- Apache 2.0
|