Changeset: 4f54264f29d7 for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=4f54264f29d7
Modified Files:
src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
Branch: default
Log Message:
Remove code for handling Types.BIT. It is and will never be used as MonetDB
does not support it. The BIT type is also already removed from the SQL standard.
diffs (64 lines):
diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
b/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
@@ -1827,7 +1827,6 @@ public class MonetPreparedStatement
setBigDecimal(parameterIndex,
new BigDecimal(num.doubleValue()));
}
break;
- case Types.BIT:
case Types.BOOLEAN:
if (num.doubleValue() != 0.0) {
setBoolean(parameterIndex,
true);
@@ -1877,7 +1876,6 @@ public class MonetPreparedStatement
}
setBigDecimal(parameterIndex, dec);
} break;
- case Types.BIT:
case Types.BOOLEAN:
setBoolean(parameterIndex, val);
break;
@@ -2328,7 +2326,6 @@ public class MonetPreparedStatement
}
setValue(parameterIndex, x);
break;
- case Types.BIT:
case Types.BOOLEAN:
if (x.equalsIgnoreCase("false") ||
x.equalsIgnoreCase("true") || x.equals("0") || x.equals("1")) {
setValue(parameterIndex, x);
diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
@@ -787,7 +787,6 @@ public class MonetResultSet
case Types.CLOB:
// check if string value equals "true"
(case insensitive) or not
return Boolean.parseBoolean(val);
- case Types.BIT: // MonetDB doesn't use type
BinaryDigit, it's here for completeness
case Types.TINYINT:
case Types.SMALLINT:
case Types.INTEGER:
@@ -1565,9 +1564,6 @@ public class MonetResultSet
case Types.DOUBLE:
_precision[column] = 15;
break;
- case Types.BIT: //
MonetDB doesn't use type BIT, it's here for completeness
-
_precision[column] = 1;
- break;
case Types.BOOLEAN:
_precision[column] = 5;
break;
@@ -1845,7 +1841,6 @@ public class MonetResultSet
}
switch(JdbcType) {
- case Types.BIT: // MonetDB doesn't use type BInary
digiT, it's here for completeness
case Types.TINYINT:
case Types.SMALLINT:
try {
@@ -2243,7 +2238,6 @@ public class MonetResultSet
return BigDecimal.class;
case Types.BOOLEAN:
return Boolean.class;
- case Types.BIT: // MonetDB doesn't support type BIT,
it's here for completeness
case Types.TINYINT:
case Types.SMALLINT:
return Short.class;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list