List of utility methods to do SQL Type
boolean | isNumberic(int type) is Numberic if (type == Types.INTEGER || type == Types.TINYINT || type == Types.SMALLINT || type == Types.DOUBLE || type == Types.FLOAT || type == Types.BIGINT) { return true; } else { return false; |
boolean | isNumberType(int aSqlType) Returns true if the passed datatype (from java.sql.Types) can hold a numeric value (either with or without decimals) return (aSqlType == Types.BIGINT || aSqlType == Types.INTEGER || aSqlType == Types.DECIMAL
|| aSqlType == Types.DOUBLE || aSqlType == Types.FLOAT || aSqlType == Types.NUMERIC
|| aSqlType == Types.REAL || aSqlType == Types.SMALLINT || aSqlType == Types.TINYINT);
|
boolean | isNumberType(int sqlType) is Number Type switch (sqlType) { case Types.BIGINT: case Types.DECIMAL: case Types.DOUBLE: case Types.FLOAT: case Types.INTEGER: case Types.NUMERIC: case Types.BIT: ... |
boolean | isNumeric(int dataType) is Numeric switch (dataType) { case java.sql.Types.NUMERIC: case java.sql.Types.DECIMAL: case java.sql.Types.BIT: case java.sql.Types.TINYINT: case java.sql.Types.SMALLINT: case java.sql.Types.INTEGER: case java.sql.Types.BIGINT: ... |
boolean | isNumeric(int dataType) is Numeric List<Integer> numericTypes = Arrays.asList(Types.BIGINT, Types.BIT, Types.INTEGER, Types.SMALLINT,
Types.TINYINT, Types.DECIMAL, Types.DOUBLE, Types.FLOAT, Types.NUMERIC, Types.REAL);
return numericTypes.contains(dataType);
|
boolean | isNumeric(int pColumnType) is Numeric return (pColumnType == Types.INTEGER || pColumnType == Types.DECIMAL || pColumnType == Types.TINYINT
|| pColumnType == Types.BIGINT || pColumnType == Types.DOUBLE || pColumnType == Types.FLOAT
|| pColumnType == Types.NUMERIC || pColumnType == Types.REAL || pColumnType == Types.SMALLINT);
|
boolean | isNumeric(int sqlType) Check whether the given SQL type is numeric. return Types.BIT == sqlType || Types.BIGINT == sqlType || Types.DECIMAL == sqlType
|| Types.DOUBLE == sqlType || Types.FLOAT == sqlType || Types.INTEGER == sqlType
|| Types.NUMERIC == sqlType || Types.REAL == sqlType || Types.SMALLINT == sqlType
|| Types.TINYINT == sqlType;
|
boolean | isNumeric(int sqlType) Check whether the given SQL type is numeric. return (Types.BIT == sqlType) || (Types.BIGINT == sqlType) || (Types.DECIMAL == sqlType)
|| (Types.DOUBLE == sqlType) || (Types.FLOAT == sqlType) || (Types.INTEGER == sqlType)
|| (Types.NUMERIC == sqlType) || (Types.REAL == sqlType) || (Types.SMALLINT == sqlType)
|| (Types.TINYINT == sqlType);
|
boolean | isNumericType(int datatype) Check if the given SQL type is numeric data type return datatype == Types.BIGINT || datatype == Types.DECIMAL || datatype == Types.DOUBLE
|| datatype == Types.FLOAT || datatype == Types.INTEGER || datatype == Types.NUMERIC
|| datatype == Types.REAL || datatype == Types.SMALLINT || datatype == Types.TINYINT;
|
boolean | isNumericType(int type) is Numeric Type return Types.BIGINT == type || Types.DECIMAL == type || Types.INTEGER == type || Types.NUMERIC == type
|| Types.SMALLINT == type || Types.TINYINT == type;
|