Skip to content

Commit

Permalink
0000936: Oracle integer datatype has a larger precision than the java…
Browse files Browse the repository at this point in the history
… Integer datatype.
  • Loading branch information
chenson42 committed Nov 30, 2012
1 parent 51cd76b commit a73efb4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Expand Up @@ -25,7 +25,6 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Array;
import java.sql.Timestamp;
import java.sql.Types;
Expand Down Expand Up @@ -392,11 +391,11 @@ public Object[] getObjectValues(BinaryEncoding encoding, String[] values,
return null;
}
}

protected Number parseIntegerObjectValue(String value) {
return new BigInteger(value);
return Integer.parseInt(value);
}

// TODO: this should be AbstractDdlBuilder.getInsertSql(Table table,
// Map<String, Object> columnValues, boolean genPlaceholders)
public String[] getStringValues(BinaryEncoding encoding, Column[] metaData, Row row,
Expand Down
Expand Up @@ -96,12 +96,15 @@ public Table getTableFromCache(String catalogName, String schemaName, String tab

public void createDatabase(Database targetDatabase, boolean dropTablesFirst,
boolean continueOnError);

public void createTables(boolean dropTablesFirst,
boolean continueOnError, Table... tables);

public void alterDatabase(Database desiredDatabase, boolean continueOnError);

public void alterTables(boolean continueOnError, Table... desiredTables);

public void dropDatabase(Database database, boolean continueOnError);
public void dropDatabase(Database database, boolean continueOnError);

public DmlStatement createDmlStatement(DmlType dmlType, Table table);

Expand Down
Expand Up @@ -74,9 +74,4 @@ public String getDefaultCatalog() {
return null;
}

@Override
protected Number parseIntegerObjectValue(String value) {
return Integer.parseInt(value);
}

}
Expand Up @@ -19,6 +19,8 @@
* under the License.
*/

import java.math.BigInteger;

import javax.sql.DataSource;

import org.apache.commons.lang.StringUtils;
Expand Down Expand Up @@ -76,6 +78,11 @@ protected OracleJdbcSqlTemplate createSqlTemplate() {
SymmetricLobHandler symmetricLobHandler = new SymmetricLobHandler(lobHandler);
return new OracleJdbcSqlTemplate(dataSource, settings, symmetricLobHandler, getDatabaseInfo());
}

@Override
protected Number parseIntegerObjectValue(String value) {
return new BigInteger(value);
}

public String getName() {
return DatabaseNamesConstants.ORACLE;
Expand Down

0 comments on commit a73efb4

Please sign in to comment.