Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary 0002644: Large float values fail to load on Sql Server
- Loading branch information
Showing
5 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
symmetric-db/src/main/java/org/jumpmind/db/platform/mssql/MsSqlDmlStatement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.jumpmind.db.platform.mssql; | ||
|
||
import java.sql.Types; | ||
|
||
import org.jumpmind.db.model.Column; | ||
import org.jumpmind.db.platform.DatabaseInfo; | ||
import org.jumpmind.db.sql.DmlStatement; | ||
|
||
public class MsSqlDmlStatement extends DmlStatement { | ||
|
||
public MsSqlDmlStatement(DmlType type, String catalogName, String schemaName, String tableName, Column[] keysColumns, Column[] columns, | ||
boolean[] nullKeyValues, DatabaseInfo databaseInfo, boolean useQuotedIdentifiers, String textColumnExpression) { | ||
super(type, catalogName, schemaName, tableName, keysColumns, columns, nullKeyValues, databaseInfo, useQuotedIdentifiers, | ||
textColumnExpression); | ||
} | ||
|
||
public MsSqlDmlStatement(DmlType type, String catalogName, String schemaName, String tableName, Column[] keysColumns, Column[] columns, | ||
boolean[] nullKeyValues, DatabaseInfo databaseInfo, boolean useQuotedIdentifiers, String textColumnExpression, | ||
boolean namedParameters) { | ||
super(type, catalogName, schemaName, tableName, keysColumns, columns, nullKeyValues, databaseInfo, useQuotedIdentifiers, | ||
textColumnExpression, namedParameters); | ||
} | ||
|
||
@Override | ||
protected int getTypeCode(Column column, boolean isDateOverrideToTimestamp) { | ||
int type = column.getMappedTypeCode(); | ||
if (type == Types.FLOAT) { | ||
return Types.VARCHAR; | ||
} else { | ||
return super.getTypeCode(column, isDateOverrideToTimestamp); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters