parameters: (session, model, search_params)
return_statement: return query
docstring: Performs the search specified by the given parameters on the model
      specified in the constructor of this class.
  
      This function essentially calls :func:`create_query` to create a query
      which matches the set of all instances of ``model`` which meet the search
      parameters defined in ``search_params``, then returns all results (or just
      one if ``search_params['single'] == True``).
  
      This function returns a single instance of the model matching the search
      parameters if ``search_params['single']`` is ``True``, or a list of all
      such instances otherwise. If ``search_params['single']`` is ``True``, then
      this method will raise :exc:`sqlalchemy.orm.exc.NoResultFound` if no
      results are found and :exc:`sqlalchemy.orm.exc.MultipleResultsFound` if
      multiple results are found.
  
      `model` is a SQLAlchemy declarative model class representing the database
      model to query.
  
      `search_params` is a dictionary containing all available search
      parameters. For more information on available search parameters, see
      :ref:`search`. Implementation note: this dictionary will be converted to a
      :class:`SearchParameters` object when the :func:`create_query` function is
      called.
docstring_summary: Performs the search specified by the given parameters on the model
      specified in the constructor of this class.
docstring_tokens: Performs the search specified by the given parameters on the model specified in the constructor of this class .
function: def search(session, model, search_params):
      """Performs the search specified by the given parameters on the model
      specified in the constructor of this class.
  
      This function essentially calls :func:`create_query` to create a query
      which matches the set of all instances of ``model`` which meet the search
      parameters defined in ``search_params``, then returns all results (or just
      one if ``search_params['single'] == True``).
  
      This function returns a single instance of the model matching the search
      parameters if ``search_params['single']`` is ``True``, or a list of all
      such instances otherwise. If ``search_params['single']`` is ``True``, then
      this method will raise :exc:`sqlalchemy.orm.exc.NoResultFound` if no
      results are found and :exc:`sqlalchemy.orm.exc.MultipleResultsFound` if
      multiple results are found.
  
      `model` is a SQLAlchemy declarative model class representing the database
      model to query.
  
      `search_params` is a dictionary containing all available search
      parameters. For more information on available search parameters, see
      :ref:`search`. Implementation note: this dictionary will be converted to a
      :class:`SearchParameters` object when the :func:`create_query` function is
      called.
  
      """
      # `is_single` is True when 'single' is a key in ``search_params`` and its
      # corresponding value is anything except those values which evaluate to
      # False (False, 0, the empty string, the empty list, etc.).
      is_single = search_params.get('single')
      query = create_query(session, model, search_params)
      if is_single:
          # may raise NoResultFound or MultipleResultsFound
          return query.one()
      return query
function_tokens: def search ( session , model , search_params ) : # `is_single` is True when 'single' is a key in ``search_params`` and its # corresponding value is anything except those values which evaluate to # False (False, 0, the empty string, the empty list, etc.). is_single = search_params . get ( 'single' ) query = create_query ( session , model , search_params ) if is_single : # may raise NoResultFound or MultipleResultsFound return query . one ( ) return query