Skip to content
Permalink
Browse files

0003196: Behaviour changed for `sym_trigger` `use_stream_lobs` and

`use_capture_lobs` fields
  • Loading branch information...
klementinastojanovska
klementinastojanovska committed Oct 27, 2017
1 parent 2bc62ef commit ec5ca317eace96eb8faadb191e05e286f0520fea
@@ -31,6 +31,7 @@
import org.jumpmind.db.platform.sqlite.SqliteDdlBuilder;
import org.jumpmind.db.platform.sqlite.SqliteDdlReader;
import org.jumpmind.db.sql.ISqlTemplate;
import org.jumpmind.db.sql.SqlTemplateSettings;

import android.content.Context;
import android.database.sqlite.SQLiteOpenHelper;
@@ -44,7 +45,7 @@
protected Context androidContext;

public AndroidDatabasePlatform(SQLiteOpenHelper database, Context androidContext) {

super(new SqlTemplateSettings());
this.database = database;
this.androidContext = androidContext;
sqlTemplate = new AndroidSqlTemplate(database, androidContext);
@@ -333,6 +333,7 @@ protected static SqlTemplateSettings createSqlTemplateSettings(TypedProperties p
settings.setBatchSize(properties.getInt(ParameterConstants.JDBC_EXECUTE_BATCH_SIZE, 100));
settings.setOverrideIsolationLevel(properties.getInt(ParameterConstants.JDBC_ISOLATION_LEVEL, -1));
settings.setReadStringsAsBytes(properties.is(ParameterConstants.JDBC_READ_STRINGS_AS_BYTES, false));
settings.setTreatBinaryAsLob(properties.is(ParameterConstants.TREAT_BINARY_AS_LOB_ENABLED, true));
LogSqlBuilder logSqlBuilder = new LogSqlBuilder();
logSqlBuilder.setLogSlowSqlThresholdMillis(properties.getInt(ParameterConstants.LOG_SLOW_SQL_THRESHOLD_MILLIS, 20000));
logSqlBuilder.setLogSqlParametersInline(properties.is(ParameterConstants.LOG_SQL_PARAMETERS_INLINE, true));
@@ -420,6 +420,8 @@ private ParameterConstants() {

public final static String DB2_CAPTURE_TRANSACTION_ID = "db2.capture.transaction.id";

public final static String TREAT_BINARY_AS_LOB_ENABLED = "treat.binary.as.lob.enabled";

public static Map<String, ParameterMetaData> getParameterMetaData() {
return parameterMetaData;
}
@@ -2141,3 +2141,10 @@ grouplet.enable=false
# Type: boolean
# Tags: load
log.conflict.resolution=false

# Whether binary fields should be treated as lobs
#
# DatabaseOverridable: false
# Type: boolean
# Tags: other
treat.binary.as.lob.enabled=true

Large diffs are not rendered by default.

@@ -26,6 +26,7 @@
protected int queryTimeout;
protected int batchSize = 100;
protected boolean readStringsAsBytes;
protected boolean treatBinaryAsLob;
protected int overrideIsolationLevel = -1;
protected int resultSetType = java.sql.ResultSet.TYPE_FORWARD_ONLY;
protected LogSqlBuilder logSqlBuilder;
@@ -64,6 +65,14 @@ public void setReadStringsAsBytes(boolean readStringsAsBytes) {
public boolean isReadStringsAsBytes() {
return readStringsAsBytes;
}

public void setTreatBinaryAsLob(boolean treatBinaryAsLob) {
this.treatBinaryAsLob = treatBinaryAsLob;
}

public boolean isTreatBinaryAsLob() {
return treatBinaryAsLob;
}

public int getOverrideIsolationLevel() {
return overrideIsolationLevel;
@@ -20,14 +20,16 @@
*/
package org.jumpmind.db.platform;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import java.sql.Timestamp;
import java.sql.Types;
import java.util.Date;

import org.jumpmind.db.platform.h2.H2DdlBuilder;
import org.jumpmind.db.sql.ISqlTemplate;
import org.jumpmind.db.sql.SqlTemplateSettings;
import org.junit.Test;

public class AbstractDatabasePlatformTest {
@@ -78,7 +80,7 @@ public void testParseQualifiedTableName() {
assertEquals(3, testDatabasePlatform.parseQualifiedTableName("\"CATALOG\".\"SCHEMA\".\"TABLE\"").size());
}

private AbstractDatabasePlatform testDatabasePlatform = new AbstractDatabasePlatform() {
private AbstractDatabasePlatform testDatabasePlatform = new AbstractDatabasePlatform(new SqlTemplateSettings()) {
@Override
public String getName() {
return "Test";
@@ -38,11 +38,9 @@

protected ISqlTemplate sqlTemplateDirty;

protected SqlTemplateSettings settings;

public AbstractJdbcDatabasePlatform(DataSource dataSource, SqlTemplateSettings settings) {
super(settings);
this.dataSource = dataSource;
this.settings = settings;
this.ddlBuilder = createDdlBuilder();
this.sqlTemplate = createSqlTemplate();
this.sqlTemplateDirty = createSqlTemplateDirty();

0 comments on commit ec5ca31

Please sign in to comment.
You can’t perform that action at this time.