Logo Search packages:      
Sourcecode: mysql-connector-java version File versions

boolean com::mysql::jdbc::ResultSetMetaData::isSigned ( int  column  )  throws SQLException [inline]

Is the column a signed number?

Parameters:
column the first column is 1, the second is 2...
Returns:
true if so
Exceptions:
SQLException if a database access error occurs

Definition at line 617 of file ResultSetMetaData.java.

References getField(), com::mysql::jdbc::Field::getSQLType(), and com::mysql::jdbc::Field::isUnsigned().

                                                            {
        Field f = getField(column);
        int sqlType = f.getSQLType();

        switch (sqlType) {
        case Types.TINYINT:
        case Types.SMALLINT:
        case Types.INTEGER:
        case Types.BIGINT:
        case Types.FLOAT:
        case Types.REAL:
        case Types.DOUBLE:
        case Types.NUMERIC:
        case Types.DECIMAL:
            return !f.isUnsigned();

        case Types.DATE:
        case Types.TIME:
        case Types.TIMESTAMP:
            return false;

        default:
            return false;
        }
    }


Generated by  Doxygen 1.6.0   Back to index