src/main/java/org/embulk/output/SQLServerOutputPlugin.java in embulk-output-sqlserver-0.7.11 vs src/main/java/org/embulk/output/SQLServerOutputPlugin.java in embulk-output-sqlserver-0.7.12
- old
+ new
@@ -81,10 +81,18 @@
public Optional<String> getTempSchema();
@Config("insert_method")
@ConfigDefault("\"normal\"")
public InsertMethod getInsertMethod();
+
+ @Config("native_driver")
+ @ConfigDefault("null")
+ public Optional<String> getNativeDriverName();
+
+ @Config("database_encoding")
+ @ConfigDefault("\"MS932\"")
+ public String getDatabaseEncoding();
}
private static class UrlAndProperties {
private final String url;
private final Properties props;
@@ -263,11 +271,13 @@
@Override
protected BatchInsert newBatchInsert(PluginTask task, Optional<MergeConfig> mergeConfig) throws IOException, SQLException
{
SQLServerPluginTask sqlServerTask = (SQLServerPluginTask) task;
if (sqlServerTask.getInsertMethod() == InsertMethod.NATIVE) {
- return new NativeBatchInsert(sqlServerTask.getHost().get(), sqlServerTask.getPort(), sqlServerTask.getInstance(),
- sqlServerTask.getDatabase().get(), sqlServerTask.getUser(), sqlServerTask.getPassword());
+ return new NativeBatchInsert(
+ sqlServerTask.getHost().get(), sqlServerTask.getPort(), sqlServerTask.getInstance(),
+ sqlServerTask.getDatabase().get(), sqlServerTask.getUser(), sqlServerTask.getPassword(),
+ sqlServerTask.getNativeDriverName(), sqlServerTask.getDatabaseEncoding());
}
return new StandardBatchInsert(getConnector(task, true), mergeConfig);
}
@Override