app/models/saved_search/saved_search_store.rb
# execute a query to get the dataset
execute a query to get the dataset
execute a query to get the dataset
def execute_query
    the_query = create_query
    results = the_query.all.collect { |result|
      the_result = {id: result.id, uuid: result.uuid, start_offset_seconds: nil, end_offset_seconds: nil}
      OpenStruct.new(the_result)
    }
    to_return = {:search => self, :query => the_query, :items => results}
    OpenStruct.new(to_return)
  end
def execute_query the_query = create_query results = the_query . all . collect { | result | the_result = { id : result . id , uuid : result . uuid , start_offset_seconds : nil , end_offset_seconds : nil } OpenStruct . new ( the_result ) } to_return = { :search => self , :query => the_query , :items => results } OpenStruct . new ( to_return ) end
execute a query to get the dataset
execute a query to get the dataset
#to do: start and end offsets