1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/ColumnDescriptor.java Sun Apr 06 17:53:36 2014 +0200
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/ColumnDescriptor.java Sun Apr 06 23:32:54 2014 +0200
1.3 @@ -17,6 +17,8 @@
1.4 */
1.5 package info.globalcode.sql.dk.formatting;
1.6
1.7 +import java.sql.Types;
1.8 +
1.9 /**
1.10 *
1.11 * @author Ing. František Kučera (frantovo.cz)
1.12 @@ -96,4 +98,25 @@
1.13 public void setColumnNumber(int columnNumber) {
1.14 this.columnNumber = columnNumber;
1.15 }
1.16 +
1.17 + public boolean isBoolean() {
1.18 + return type == Types.BOOLEAN;
1.19 + }
1.20 +
1.21 + public boolean isNumeric() {
1.22 + switch (type) {
1.23 + case Types.BIGINT:
1.24 + case Types.DECIMAL:
1.25 + case Types.DOUBLE:
1.26 + case Types.FLOAT:
1.27 + case Types.INTEGER:
1.28 + case Types.NUMERIC:
1.29 + case Types.REAL:
1.30 + case Types.SMALLINT:
1.31 + case Types.TINYINT:
1.32 + return true;
1.33 + default:
1.34 + return false;
1.35 + }
1.36 + }
1.37 }