code: func listNICs(c context.Context, q database.QueryerContext, req *crimson.ListNICsRequest) ([]*crimson.NIC, error) {
  	mac48s, err := parseMAC48s(req.MacAddresses)
  	if err != nil {
  		return nil, err
  	}
  
  	stmt := squirrel.Select("n.name", "m.name", "n.mac_address", "s.name", "n.switchport").
  		From("nics n, machines m, switches s").
  		Where("n.machine_id = m.id").Where("n.switch_id = s.id")
  	stmt = selectInString(stmt, "n.name", req.Names)
  	stmt = selectInString(stmt, "m.name", req.Machines)
  	stmt = selectInUint64(stmt, "n.mac_address", mac48s)
  	stmt = selectInString(stmt, "s.name", req.Switches)
  	query, args, err := stmt.ToSql()
  	if err != nil {
  		return nil, errors.Annotate(err, "failed to generate statement").Err()
  	}
  
  	rows, err := q.QueryContext(c, query, args...)
  	if err != nil {
  		return nil, errors.Annotate(err, "failed to fetch NICs").Err()
  	}
  	defer rows.Close()
  	var nics []*crimson.NIC
  	for rows.Next() {
  		n := &crimson.NIC{}
  		var mac48 common.MAC48
  		if err = rows.Scan(&n.Name, &n.Machine, &mac48, &n.Switch, &n.Switchport); err != nil {
  			return nil, errors.Annotate(err, "failed to fetch NIC").Err()
  		}
  		n.MacAddress = mac48.String()
  		nics = append(nics, n)
  	}
  	return nics, nil
  }
docs: // listNICs returns a slice of NICs in the database.