docs: public BigInteger getInternalBigInteger(ColumnInformation columnInfo) throws SQLException {
      if (lastValueWasNull()) {
        return null;
      }
      switch (columnInfo.getColumnType()) {
        case BIT:
          return BigInteger.valueOf((long) buf[pos]);
        case TINYINT:
          return BigInteger.valueOf((long)
              (columnInfo.isSigned() ? buf[pos] : (buf[pos] & 0xff)));
        case SMALLINT:
        case YEAR:
          short valueShort = (short) ((buf[pos] & 0xff) | ((buf[pos + 1] & 0xff) << 8));
          return BigInteger
              .valueOf((long) (columnInfo.isSigned() ? valueShort : (valueShort & 0xffff)));
        case INTEGER:
        case MEDIUMINT:
          int valueInt = ((buf[pos] & 0xff)
              + ((buf[pos + 1] & 0xff) << 8)
              + ((buf[pos + 2] & 0xff) << 16)
              + ((buf[pos + 3] & 0xff) << 24));
          return BigInteger.valueOf(((columnInfo.isSigned()) ? valueInt
              : (valueInt >= 0) ? valueInt : valueInt & 0xffffffffL));
        case BIGINT:
          long value = ((buf[pos] & 0xff)
              + ((long) (buf[pos + 1] & 0xff) << 8)
              + ((long) (buf[pos + 2] & 0xff) << 16)
              + ((long) (buf[pos + 3] & 0xff) << 24)
              + ((long) (buf[pos + 4] & 0xff) << 32)
              + ((long) (buf[pos + 5] & 0xff) << 40)
              + ((long) (buf[pos + 6] & 0xff) << 48)
              + ((long) (buf[pos + 7] & 0xff) << 56)
          );
          if (columnInfo.isSigned()) {
            return BigInteger.valueOf(value);
          } else {
            return new BigInteger(1, new byte[]{(byte) (value >> 56),
                (byte) (value >> 48), (byte) (value >> 40), (byte) (value >> 32),
                (byte) (value >> 24), (byte) (value >> 16), (byte) (value >> 8),
                (byte) value});
          }
        case FLOAT:
          return BigInteger.valueOf((long) getInternalFloat(columnInfo));
        case DOUBLE:
          return BigInteger.valueOf((long) getInternalDouble(columnInfo));
        case DECIMAL:
        case OLDDECIMAL:
          return BigInteger.valueOf(getInternalBigDecimal(columnInfo).longValue());
        default:
          return new BigInteger(new String(buf, pos, length, StandardCharsets.UTF_8));
      }
    }