code: func selectQuery(query *protocol.KontrolQuery) (string, []interface{}, error) {
  	psql := sq.StatementBuilder.PlaceholderFormat(sq.Dollar)
  
  	kites := psql.Select("*").From("kite.kite")
  	fields := query.Fields()
  	andQuery := sq.And{}
  
  	// we stop for the first empty value
  	for _, key := range keyOrder {
  		v := fields[key]
  		if v == "" {
  			continue
  		}
  
  		// we are using "kitename" as the columname
  		if key == "name" {
  			key = "kitename"
  		}
  
  		andQuery = append(andQuery, sq.Eq{key: v})
  	}
  
  	if len(andQuery) == 0 {
  		return "", nil, ErrQueryFieldsEmpty
  	}
  
  	return kites.Where(andQuery).ToSql()
  }
docs: // selectQuery returns a SQL query for the given query