embulk-output-cdata 0.3.0 → 0.3.1

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: 4403bdc2f1e558cd452acc0fef1d9741cd5971f8
4
- data.tar.gz: e41965e8e79123fc9d09b5bbf44bf856219f56f7
3
+ metadata.gz: 90fadee674529b7de2ad81d3ae7d4d541897f250
4
+ data.tar.gz: c4e6016c12c8d13e85050d737dfbe5fe85c26d67
5
5
  SHA512:
6
- metadata.gz: cfc0e796edb284bb5488c6b80dd560953e7916b2ee3dd5d9ea762b2b8387cbf63d41a79437eca6c9e9df4dd4731d36cd37d6134651d11282f1505feb87ea0332
7
- data.tar.gz: 61ce986620b87e48670dd34d7d3a8ff30b3fb318f3a9048836bcc57997ed030e3adfd5cec16ee39dab0187b99e3c900cb1f3783964702f96c896d6e6667a7756
6
+ metadata.gz: 18e8c5c020dfb018aa6648df569dbae1e598e32b702baa58bd60a9ffdaf0f46bbbf9efc010d7fa20604090d9505fd78f1a740b14bd67f7fde45710ec649d4618
7
+ data.tar.gz: f090bf63e1c8a13f1abf4b3c172646e6d6da679ebf1d68fdcbea06f955a6cdd9d642e68c749eee71c8f6f369ce359131091159a165d498a21fbcb66665755682
data/build.gradle CHANGED
@@ -13,7 +13,7 @@ configurations {
13
13
  provided
14
14
  }
15
15
 
16
- version = "0.3.0"
16
+ version = "0.3.1"
17
17
 
18
18
  sourceCompatibility = 1.8
19
19
  targetCompatibility = 1.8
@@ -81,7 +81,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
81
81
  @Override
82
82
  public void booleanColumn(Column column) {
83
83
  try {
84
- preparedStatementColumnLogger(column);
84
+ logger.info(column.getName() + ": " + pageReader.getBoolean(column));
85
85
  preparedStatement.setBoolean(column.getIndex() + 2, pageReader.getBoolean(column));
86
86
  } catch (SQLException e) {
87
87
  throw new RuntimeException(e);
@@ -91,7 +91,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
91
91
  @Override
92
92
  public void longColumn(Column column) {
93
93
  try {
94
- preparedStatementColumnLogger(column);
94
+ logger.info(column.getName() + ": " + pageReader.getLong(column));
95
95
  preparedStatement.setLong(column.getIndex() + 2, pageReader.getLong(column));
96
96
  } catch (SQLException e) {
97
97
  throw new RuntimeException(e);
@@ -101,7 +101,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
101
101
  @Override
102
102
  public void doubleColumn(Column column) {
103
103
  try {
104
- preparedStatementColumnLogger(column);
104
+ logger.info(column.getName() + ": " + pageReader.getDouble(column));
105
105
  preparedStatement.setDouble(column.getIndex() + 2, pageReader.getDouble(column));
106
106
  } catch (SQLException e) {
107
107
  throw new RuntimeException(e);
@@ -111,7 +111,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
111
111
  @Override
112
112
  public void stringColumn(Column column) {
113
113
  try {
114
- preparedStatementColumnLogger(column);
114
+ logger.info(column.getName() + ": " + pageReader.getString(column));
115
115
  if (Objects.equals(column.getName(), task.getExternalIdColumn())) {
116
116
  currentExternalIdColumn = pageReader.getString(column);
117
117
  }
@@ -124,7 +124,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
124
124
  @Override
125
125
  public void timestampColumn(Column column) {
126
126
  try {
127
- preparedStatementColumnLogger(column);
127
+ logger.info(column.getName() + ": " + pageReader.getTimestampInstant(column));
128
128
  preparedStatement.setTimestamp(column.getIndex() + 2, Timestamp.from(pageReader.getTimestampInstant(column)));
129
129
  } catch (SQLException e) {
130
130
  throw new RuntimeException(e);
@@ -134,7 +134,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
134
134
  @Override
135
135
  public void jsonColumn(Column column) {
136
136
  try {
137
- preparedStatementColumnLogger(column);
137
+ logger.info(column.getName() + ": " + pageReader.getString(column));
138
138
  preparedStatement.setString(column.getIndex() + 2, pageReader.getString(column));
139
139
  } catch (SQLException e) {
140
140
  throw new RuntimeException(e);
@@ -143,7 +143,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
143
143
  });
144
144
  String id = idMap.get(currentExternalIdColumn);
145
145
  if (id != null) {
146
- preparedStatement.setString(1, idMap.get(currentExternalIdColumn));
146
+ preparedStatement.setString(1, id);
147
147
  preparedStatement.executeUpdate();
148
148
  logger.info("inserted to Temp#TEMP");
149
149
  } else {
@@ -197,8 +197,4 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
197
197
  public TaskReport commit() {
198
198
  return null;
199
199
  }
200
-
201
- private void preparedStatementColumnLogger(Column column) {
202
- logger.info(column.getName() + ": " + pageReader.getString(column));
203
- }
204
200
  }
@@ -50,7 +50,7 @@ public class CDataPageOutputForUpsert implements TransactionalPageOutput {
50
50
  @Override
51
51
  public void booleanColumn(Column column) {
52
52
  try {
53
- preparedStatementColumnLogger(column);
53
+ logger.info(column.getName() + ": " + pageReader.getBoolean(column));
54
54
  preparedStatement.setBoolean(column.getIndex() + 1, pageReader.getBoolean(column));
55
55
  } catch (SQLException e) {
56
56
  throw new RuntimeException(e);
@@ -60,7 +60,7 @@ public class CDataPageOutputForUpsert implements TransactionalPageOutput {
60
60
  @Override
61
61
  public void longColumn(Column column) {
62
62
  try {
63
- preparedStatementColumnLogger(column);
63
+ logger.info(column.getName() + ": " + pageReader.getLong(column));
64
64
  preparedStatement.setLong(column.getIndex() + 1, pageReader.getLong(column));
65
65
  } catch (SQLException e) {
66
66
  throw new RuntimeException(e);
@@ -70,7 +70,7 @@ public class CDataPageOutputForUpsert implements TransactionalPageOutput {
70
70
  @Override
71
71
  public void doubleColumn(Column column) {
72
72
  try {
73
- preparedStatementColumnLogger(column);
73
+ logger.info(column.getName() + ": " + pageReader.getDouble(column));
74
74
  preparedStatement.setDouble(column.getIndex() + 1, pageReader.getDouble(column));
75
75
  } catch (SQLException e) {
76
76
  throw new RuntimeException(e);
@@ -80,7 +80,7 @@ public class CDataPageOutputForUpsert implements TransactionalPageOutput {
80
80
  @Override
81
81
  public void stringColumn(Column column) {
82
82
  try {
83
- preparedStatementColumnLogger(column);
83
+ logger.info(column.getName() + ": " + pageReader.getString(column));
84
84
  preparedStatement.setString(column.getIndex() + 1, pageReader.getString(column));
85
85
  } catch (SQLException e) {
86
86
  throw new RuntimeException(e);
@@ -90,7 +90,7 @@ public class CDataPageOutputForUpsert implements TransactionalPageOutput {
90
90
  @Override
91
91
  public void timestampColumn(Column column) {
92
92
  try {
93
- preparedStatementColumnLogger(column);
93
+ logger.info(column.getName() + ": " + pageReader.getTimestampInstant(column));
94
94
  preparedStatement.setTimestamp(column.getIndex() + 1, Timestamp.from(pageReader.getTimestampInstant(column)));
95
95
  } catch (SQLException e) {
96
96
  throw new RuntimeException(e);
@@ -100,7 +100,7 @@ public class CDataPageOutputForUpsert implements TransactionalPageOutput {
100
100
  @Override
101
101
  public void jsonColumn(Column column) {
102
102
  try {
103
- preparedStatementColumnLogger(column);
103
+ logger.info(column.getName() + ": " + pageReader.getString(column));
104
104
  preparedStatement.setString(column.getIndex() + 1, pageReader.getString(column));
105
105
  } catch (SQLException e) {
106
106
  throw new RuntimeException(e);
@@ -158,8 +158,4 @@ public class CDataPageOutputForUpsert implements TransactionalPageOutput {
158
158
  public TaskReport commit() {
159
159
  return null;
160
160
  }
161
-
162
- private void preparedStatementColumnLogger(Column column) {
163
- logger.info(column.getName() + ": " + pageReader.getString(column));
164
- }
165
161
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-cdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sampo02
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-20 00:00:00.000000000 Z
11
+ date: 2022-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ files:
49
49
  - LICENSE.txt
50
50
  - README.md
51
51
  - build.gradle
52
- - classpath/embulk-output-cdata-0.3.0.jar
52
+ - classpath/embulk-output-cdata-0.3.1.jar
53
53
  - config/checkstyle/checkstyle.xml
54
54
  - config/checkstyle/default.xml
55
55
  - gradle/wrapper/gradle-wrapper.jar