embulk-output-jdbc 0.7.11 → 0.7.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae6b599749ebe50a9b832c6ba8d0784a6737cb7c
|
4
|
+
data.tar.gz: 43c7475f21f28132563ba0a6592e7fbedb4790e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bb01073bf551b713858e89f0f7364c428457c51107c25f357d962573ca5556f3623d0d4462b0d44fb75506c936853996c81684c639c7073b0e9921cb54be33b
|
7
|
+
data.tar.gz: 468e740668ce4e9f03edfc001703fcb21017f5380f9fe00f3de71c1de53fe35ce4ee580517c5f8a07cd45ee6fd165633b6994a4999bf2a5db039a09101094ae3
|
Binary file
|
@@ -2,7 +2,6 @@ package org.embulk.output.jdbc;
|
|
2
2
|
|
3
3
|
import com.google.common.base.Optional;
|
4
4
|
import org.joda.time.DateTimeZone;
|
5
|
-
import org.jruby.embed.ScriptingContainer;
|
6
5
|
import org.embulk.config.Task;
|
7
6
|
import org.embulk.config.Config;
|
8
7
|
import org.embulk.config.ConfigDefault;
|
@@ -27,8 +26,4 @@ public interface JdbcColumnOption
|
|
27
26
|
@Config("timezone")
|
28
27
|
@ConfigDefault("null")
|
29
28
|
public Optional<DateTimeZone> getTimeZone();
|
30
|
-
|
31
|
-
// required by TimestampFormatter
|
32
|
-
@ConfigInject
|
33
|
-
public ScriptingContainer getJRuby();
|
34
29
|
}
|
@@ -1,9 +1,13 @@
|
|
1
1
|
package org.embulk.output.jdbc.setter;
|
2
2
|
|
3
|
+
import com.google.common.base.Optional;
|
3
4
|
import java.util.Calendar;
|
4
5
|
import java.util.Locale;
|
5
6
|
import java.sql.Types;
|
6
7
|
import org.joda.time.DateTimeZone;
|
8
|
+
import org.embulk.config.ConfigSource;
|
9
|
+
import org.embulk.config.Task;
|
10
|
+
import org.embulk.spi.Exec;
|
7
11
|
import org.embulk.spi.time.TimestampFormatter;
|
8
12
|
import org.embulk.output.jdbc.BatchInsert;
|
9
13
|
import org.embulk.output.jdbc.JdbcColumn;
|
@@ -73,12 +77,19 @@ public class ColumnSetterFactory
|
|
73
77
|
}
|
74
78
|
}
|
75
79
|
|
80
|
+
private static interface FormatterIntlTask extends Task, TimestampFormatter.Task {}
|
81
|
+
private static interface FormatterIntlColumnOption extends Task, TimestampFormatter.TimestampColumnOption {}
|
82
|
+
|
76
83
|
protected TimestampFormatter newTimestampFormatter(JdbcColumnOption option)
|
77
84
|
{
|
85
|
+
// TODO: Switch to a newer TimestampFormatter constructor after a reasonable interval.
|
86
|
+
// Traditional constructor is used here for compatibility.
|
87
|
+
final ConfigSource configSource = Exec.newConfigSource();
|
88
|
+
configSource.set("format", option.getTimestampFormat().getFormat());
|
89
|
+
configSource.set("timezone", getTimeZone(option));
|
78
90
|
return new TimestampFormatter(
|
79
|
-
|
80
|
-
|
81
|
-
getTimeZone(option));
|
91
|
+
Exec.newConfigSource().loadConfig(FormatterIntlTask.class),
|
92
|
+
Optional.fromNullable(configSource.loadConfig(FormatterIntlColumnOption.class)));
|
82
93
|
}
|
83
94
|
|
84
95
|
protected Calendar newCalendar(JdbcColumnOption option)
|
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.
|
4
|
+
version: 0.7.12
|
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-
|
11
|
+
date: 2017-11-24 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.
|
22
|
+
- classpath/embulk-output-jdbc-0.7.12.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
|
Binary file
|