async _read()

in src/EnumItem.ts [199:212]


    async _read(communicator: BinaryCommunicator, buffer: MessageBuffer) {
        this._typeId = buffer.readInteger();
        this._ordinal = buffer.readInteger();
        const type = await this._getType(communicator, this._typeId);
        if (!type || !type.isEnum) {
            throw IgniteClientError.enumSerializationError(
                false, Util.format('enum type id "%d" is not registered', this._typeId));
        }
        else if (!type.enumValues || type.enumValues.length <= this._ordinal) {
            throw IgniteClientError.enumSerializationError(false, 'type mismatch');
        }
        this._name = type.enumValues[this._ordinal][0];
        this._value = type.enumValues[this._ordinal][1];
    }