code: func (p *QueryEventParser) Parse(raw *RawV4Event) (Event, error) {
  	query := &QueryEvent{
  		Event: raw,
  	}
  
  	type fixedBodyStruct struct {
  		ThreadId           uint32
  		Duration           uint32
  		DatabaseNameLength uint8
  		ErrorCode          uint16
  		StatusLength       uint16
  	}
  
  	fixed := fixedBodyStruct{}
  
  	_, err := readLittleEndian(raw.FixedLengthData(), &fixed)
  	if err != nil {
  		return raw, errors.Wrap(err, "Failed to read fixed body")
  	}
  
  	query.threadId = fixed.ThreadId
  	query.duration = fixed.Duration
  	query.errorCode = mysql_proto.ErrorCode_Type(fixed.ErrorCode)
  
  	data := raw.VariableLengthData()
  
  	dbNameEnd := int(fixed.StatusLength) + int(fixed.DatabaseNameLength)
  	if dbNameEnd+1 > len(data) {
  		return raw, errors.Newf("Invalid message length")
  	}
  
  	query.statusBytes = data[:fixed.StatusLength]
  
  	query.databaseName = data[fixed.StatusLength:dbNameEnd]
  
  	query.query = data[dbNameEnd+1:]
  
  	err = p.parseStatus(query)
  	if err != nil {
  		return raw, err
  	}
  
  	return query, nil
  }
docs: // QueryEventParser's Parse processes a raw query event into a QueryEvent.