private static void decodeValueEntry()

in db-protocol/mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/string/MySQLJsonValueDecoder.java [144:186]


    private static void decodeValueEntry(final boolean isSmall, final ByteBuf byteBuf, final StringBuilder stringBuilder) {
        int type = byteBuf.readUnsignedByte() & 0xff;
        switch (type) {
            case JsonValueTypes.SMALL_JSON_OBJECT:
            case JsonValueTypes.LARGE_JSON_OBJECT:
            case JsonValueTypes.SMALL_JSON_ARRAY:
            case JsonValueTypes.LARGE_JSON_ARRAY:
            case JsonValueTypes.INT64:
            case JsonValueTypes.UINT64:
            case JsonValueTypes.DOUBLE:
            case JsonValueTypes.STRING:
                decodeValue(type, getIntBasedObjectSize(byteBuf, isSmall), byteBuf, stringBuilder);
                break;
            case JsonValueTypes.INT16:
                stringBuilder.append(byteBuf.readShortLE());
                if (!isSmall) {
                    byteBuf.skipBytes(2);
                }
                break;
            case JsonValueTypes.UINT16:
                stringBuilder.append(getIntBasedObjectSize(byteBuf, isSmall));
                break;
            case JsonValueTypes.INT32:
                if (isSmall) {
                    decodeValue(type, byteBuf.readUnsignedShortLE(), byteBuf, stringBuilder);
                } else {
                    stringBuilder.append(byteBuf.readIntLE());
                }
                break;
            case JsonValueTypes.UINT32:
                if (isSmall) {
                    decodeValue(type, byteBuf.readUnsignedShortLE(), byteBuf, stringBuilder);
                } else {
                    stringBuilder.append(byteBuf.readUnsignedIntLE());
                }
                break;
            case JsonValueTypes.LITERAL:
                outputLiteral(getIntBasedObjectSize(byteBuf, isSmall), stringBuilder);
                break;
            default:
                throw new UnsupportedSQLOperationException(String.valueOf(type));
        }
    }