code: def search(query, query_type=DEFAULT_QUERY_TYPE):
      statement, arguments = _build_search(query)
      if statement is None and arguments is None:
          return QueryResults([], [], 'AND')
      with db_connect() as db_connection:
          with db_connection.cursor() as cursor:
              cursor.execute(statement, arguments)
              search_results = cursor.fetchall()
      return QueryResults(search_results, query, query_type)