Exemplo n.º 1
0
        bool Parse_Field_Content(MySqlStreamReader reader)
        {
            if (!reader.Ensure(_currentHeader.ContentLength)) //check if length is enough to parse
            {
#if DEBUG
                reader.dbugMonitorData1 = true;
#endif
                return(_needMoreData = true);
            }


            var fieldPacket = new FieldPacket(_currentHeader, this._isProtocol41);
            fieldPacket.ParsePacketContent(reader);
            fieldPacket.FieldIndex = _tableHeader.ColumnCount; //set this before  add to field list
            _tableHeader.AddField(fieldPacket);

#if DEBUG
            //TODO:review here
            if (fieldPacket.dbugFailure)
            {
                throw new NotSupportedException();
            }
#endif

            //next state => field header of next field
            _parsingState = ResultPacketState.Field_Header;
            return(false);
        }
Exemplo n.º 2
0
        bool Parse_ColumnField_Content(MySqlStreamReader reader)
        {
            if (!reader.Ensure(_currentHeader.ContentLength))
            {
                return(_needMoreData = true);
            }
            var field = new FieldPacket(_currentHeader, _isProtocol41);

            field.ParsePacketContent(reader);
            field.FieldIndex = _tableHeader.ColumnCount; //set this before  add to field list
            _tableHeader.AddField(field);
            //back to field header
            _parsingState = PrepareResponseParseState.ColumnField_Header;
            return(false);
        }
 bool Parse_ColumnField_Content(MySqlStreamReader reader)
 {
     if (!reader.Ensure(_currentHeader.ContentLength))
     {
         return _needMoreData = true;
     }
     var field = new FieldPacket(_currentHeader, _isProtocol41);
     field.ParsePacketContent(reader);
     field.FieldIndex = _tableHeader.ColumnCount; //set this before  add to field list
     _tableHeader.AddField(field);
     //back to field header
     _parsingState = PrepareResponseParseState.ColumnField_Header;
     return false;
 }
        bool Parse_Field_Content(MySqlStreamReader reader)
        {


            if (!reader.Ensure(_currentHeader.ContentLength)) //check if length is enough to parse 
            {
#if DEBUG
                reader.dbugMonitorData1 = true;
#endif
                return _needMoreData = true;
            }


            var fieldPacket = new FieldPacket(_currentHeader, this._isProtocol41);
            fieldPacket.ParsePacketContent(reader);
            fieldPacket.FieldIndex = _tableHeader.ColumnCount; //set this before  add to field list
            _tableHeader.AddField(fieldPacket);

#if DEBUG
            //TODO:review here
            if (fieldPacket.dbugFailure)
            {
                throw new NotSupportedException();
            }
#endif

            //next state => field header of next field
            _parsingState = ResultPacketState.Field_Header;
            return false;
        }