code: def get_ports(port, like=False):
      
      where_field = "port" if port.isdigit() else "name"
      if like:
          ports = __DB__.search(where(where_field).search(port))
      else:
          ports = __DB__.search(where(where_field) == port)
  
      return [Port(**port) for port in ports]
docs: This function creates the SQL query depending on the specified port and
      the --like option.
  
      :param port: the specified port
      :param like: the --like option
      :return: all ports matching the given ``port``
      :rtype: list