embulk-output-postgresql 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +90 -89
- data/build.gradle +7 -7
- data/classpath/embulk-output-jdbc-0.4.2.jar +0 -0
- data/classpath/embulk-output-postgresql-0.4.2.jar +0 -0
- data/classpath/postgresql-9.4-1205-jdbc41.jar +0 -0
- data/lib/embulk/output/postgresql.rb +3 -3
- data/src/main/java/org/embulk/output/PostgreSQLOutputPlugin.java +166 -165
- data/src/main/java/org/embulk/output/postgresql/AbstractPostgreSQLCopyBatchInsert.java +242 -245
- data/src/main/java/org/embulk/output/postgresql/PostgreSQLCopyBatchInsert.java +71 -73
- data/src/main/java/org/embulk/output/postgresql/PostgreSQLOutputConnection.java +156 -157
- data/src/main/java/org/embulk/output/postgresql/PostgreSQLOutputConnector.java +39 -40
- metadata +5 -9
- data/classpath/embulk-output-jdbc-0.4.1.jar +0 -0
- data/classpath/embulk-output-postgresql-0.4.1.jar +0 -0
- data/classpath/jna-4.1.0.jar +0 -0
- data/classpath/jna-platform-4.1.0.jar +0 -0
- data/classpath/postgresql-9.4-1200-jdbc41.jar +0 -0
- data/classpath/slf4j-simple-1.7.7.jar +0 -0
- data/classpath/waffle-jna-1.7.jar +0 -0
@@ -1,40 +1,39 @@
|
|
1
|
-
package org.embulk.output.postgresql;
|
2
|
-
|
3
|
-
import java.util.Properties;
|
4
|
-
import java.sql.Driver;
|
5
|
-
import java.sql.Connection;
|
6
|
-
import java.sql.SQLException;
|
7
|
-
import org.embulk.output.jdbc.JdbcOutputConnector;
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
private final
|
16
|
-
private final
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
this.
|
22
|
-
this.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
}
|
1
|
+
package org.embulk.output.postgresql;
|
2
|
+
|
3
|
+
import java.util.Properties;
|
4
|
+
import java.sql.Driver;
|
5
|
+
import java.sql.Connection;
|
6
|
+
import java.sql.SQLException;
|
7
|
+
import org.embulk.output.jdbc.JdbcOutputConnector;
|
8
|
+
|
9
|
+
public class PostgreSQLOutputConnector
|
10
|
+
implements JdbcOutputConnector
|
11
|
+
{
|
12
|
+
private static final Driver driver = new org.postgresql.Driver();
|
13
|
+
|
14
|
+
private final String url;
|
15
|
+
private final Properties properties;
|
16
|
+
private final String schemaName;
|
17
|
+
|
18
|
+
public PostgreSQLOutputConnector(String url, Properties properties, String schemaName)
|
19
|
+
{
|
20
|
+
this.url = url;
|
21
|
+
this.properties = properties;
|
22
|
+
this.schemaName = schemaName;
|
23
|
+
}
|
24
|
+
|
25
|
+
@Override
|
26
|
+
public PostgreSQLOutputConnection connect(boolean autoCommit) throws SQLException
|
27
|
+
{
|
28
|
+
Connection c = driver.connect(url, properties);
|
29
|
+
try {
|
30
|
+
PostgreSQLOutputConnection con = new PostgreSQLOutputConnection(c, schemaName, autoCommit);
|
31
|
+
c = null;
|
32
|
+
return con;
|
33
|
+
} finally {
|
34
|
+
if (c != null) {
|
35
|
+
c.close();
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-postgresql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
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-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Inserts or updates records to a table.
|
14
14
|
email:
|
@@ -25,13 +25,9 @@ files:
|
|
25
25
|
- src/main/java/org/embulk/output/postgresql/PostgreSQLCopyBatchInsert.java
|
26
26
|
- src/main/java/org/embulk/output/postgresql/PostgreSQLOutputConnection.java
|
27
27
|
- src/main/java/org/embulk/output/postgresql/PostgreSQLOutputConnector.java
|
28
|
-
- classpath/embulk-output-jdbc-0.4.
|
29
|
-
- classpath/embulk-output-postgresql-0.4.
|
30
|
-
- classpath/
|
31
|
-
- classpath/jna-platform-4.1.0.jar
|
32
|
-
- classpath/postgresql-9.4-1200-jdbc41.jar
|
33
|
-
- classpath/slf4j-simple-1.7.7.jar
|
34
|
-
- classpath/waffle-jna-1.7.jar
|
28
|
+
- classpath/embulk-output-jdbc-0.4.2.jar
|
29
|
+
- classpath/embulk-output-postgresql-0.4.2.jar
|
30
|
+
- classpath/postgresql-9.4-1205-jdbc41.jar
|
35
31
|
homepage: https://github.com/embulk/embulk-output-jdbc
|
36
32
|
licenses:
|
37
33
|
- Apache 2.0
|
Binary file
|
Binary file
|
data/classpath/jna-4.1.0.jar
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|