public long getPrecision ( ) { switch ( type ) { case OLDDECIMAL : case DECIMAL : //DECIMAL and OLDDECIMAL are "exact" fixed-point number. //so : // - if can be signed, 1 byte is saved for sign // - if decimal > 0, one byte more for dot if ( isSigned ( ) ) { return length - ( ( decimals > 0 ) ? 2 : 1 ) ; } else { return length - ( ( decimals > 0 ) ? 1 : 0 ) ; } default : return length ; } }
Return metadata precision .