|
20 | 20 |
|
21 | 21 | import com.dtstack.chunjun.config.TypeConfig; |
22 | 22 | import com.dtstack.chunjun.connector.jdbc.conf.TableIdentify; |
| 23 | +import com.dtstack.chunjun.connector.jdbc.config.JdbcConfig; |
23 | 24 | import com.dtstack.chunjun.connector.jdbc.dialect.JdbcDialect; |
24 | 25 | import com.dtstack.chunjun.connector.jdbc.statement.FieldNamedPreparedStatement; |
25 | 26 | import com.dtstack.chunjun.connector.mysql.converter.MysqlRawTypeConverter; |
|
37 | 38 | import java.util.Arrays; |
38 | 39 | import java.util.Locale; |
39 | 40 | import java.util.Optional; |
| 41 | +import java.util.Properties; |
40 | 42 | import java.util.function.Function; |
41 | 43 | import java.util.stream.Collectors; |
42 | 44 |
|
@@ -166,4 +168,28 @@ public Function<Tuple3<String, Integer, Integer>, TypeConfig> typeBuilder() { |
166 | 168 | return typeConfig; |
167 | 169 | }); |
168 | 170 | } |
| 171 | + |
| 172 | + @Override |
| 173 | + public void putWriterExtParam(JdbcConfig jdbcConf) { |
| 174 | + Properties properties = jdbcConf.getProperties(); |
| 175 | + if (properties == null) { |
| 176 | + properties = new Properties(); |
| 177 | + } |
| 178 | + properties.putIfAbsent("useCursorFetch", "true"); |
| 179 | + properties.putIfAbsent("rewriteBatchedStatements", "true"); |
| 180 | + properties.put("tinyInt1isBit", "false"); |
| 181 | + jdbcConf.setProperties(properties); |
| 182 | + } |
| 183 | + |
| 184 | + @Override |
| 185 | + public void putReaderExtParam(JdbcConfig jdbcConf) { |
| 186 | + Properties properties = jdbcConf.getProperties(); |
| 187 | + if (properties == null) { |
| 188 | + properties = new Properties(); |
| 189 | + } |
| 190 | + properties.putIfAbsent("useCursorFetch", "true"); |
| 191 | + properties.putIfAbsent("rewriteBatchedStatements", "true"); |
| 192 | + properties.put("tinyInt1isBit", "false"); |
| 193 | + jdbcConf.setProperties(properties); |
| 194 | + } |
169 | 195 | } |
0 commit comments