@Override public void writeValue(DataBuffer buff, Value v) { float x = v.getFloat(); write0(buff, x); }
/** * Returns the value of the specified column as a float. * * @param columnLabel the column label * @return the value * @throws SQLException if the column is not found or if the result set is * closed */ @Override public float getFloat(String columnLabel) throws SQLException { try { debugCodeCall("getFloat", columnLabel); return get(columnLabel).getFloat(); } catch (Exception e) { throw logAndConvert(e); } }
/** * Returns the value of the specified column as a float. * * @param columnIndex (1,2,...) * @return the value * @throws SQLException if the column is not found or if the result set is * closed */ @Override public float getFloat(int columnIndex) throws SQLException { try { debugCodeCall("getFloat", columnIndex); return get(columnIndex).getFloat(); } catch (Exception e) { throw logAndConvert(e); } }
return ValueByte.get(convertToByte(convertToLong(getDouble()))); case FLOAT: return ValueByte.get(convertToByte(convertToLong(getFloat()))); case BYTES: return ValueByte.get((byte) Integer.parseInt(getString(), 16)); return ValueShort.get(convertToShort(convertToLong(getDouble()))); case FLOAT: return ValueShort.get(convertToShort(convertToLong(getFloat()))); case BYTES: return ValueShort.get((short) Integer.parseInt(getString(), 16)); return ValueInt.get(convertToInt(convertToLong(getDouble()))); case FLOAT: return ValueInt.get(convertToInt(convertToLong(getFloat()))); case BYTES: return ValueInt.get((int) Long.parseLong(getString(), 16)); return ValueLong.get(convertToLong(getDouble())); case FLOAT: return ValueLong.get(convertToLong(getFloat())); case BYTES: { float f = getFloat(); if (Float.isInfinite(f) || Float.isNaN(f)) { throw DbException.get(ErrorCode.DATA_CONVERSION_ERROR_1, "" + f); return ValueDouble.get(getBigDecimal().doubleValue()); case FLOAT:
break; case Value.FLOAT: writeFloat(v.getFloat()); break; case Value.SHORT: