Class: Draisine::QueryMechanisms::SystemModstamp

Inherits:
Base
  • Object
show all
Defined in:
lib/draisine/query_mechanisms/system_modstamp.rb

Instance Attribute Summary

Attributes inherited from Base

#client, #model_class

Instance Method Summary collapse

Methods inherited from Base

#initialize, #salesforce_object_name

Constructor Details

This class inherits a constructor from Draisine::QueryMechanisms::Base

Instance Method Details

#get_deleted_ids(start_date, end_date) ⇒ Object



13
14
15
# File 'lib/draisine/query_mechanisms/system_modstamp.rb', line 13

def get_deleted_ids(start_date, end_date)
  []
end

#get_updated_ids(start_date, end_date) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/draisine/query_mechanisms/system_modstamp.rb', line 4

def get_updated_ids(start_date, end_date)
  response = client.query <<-EOQ
  SELECT Id FROM #{salesforce_object_name}
  WHERE SystemModstamp >= #{start_date.iso8601}
  AND SystemModstamp <= #{end_date.iso8601}
  EOQ
  response.map(&:Id)
end