Class: Webhookdb::Replicator::IcalendarCalendarV1::Upserter
- Inherits:
-
Object
- Object
- Webhookdb::Replicator::IcalendarCalendarV1::Upserter
- Includes:
- Backfiller::Bulk
- Defined in:
- lib/webhookdb/replicator/icalendar_calendar_v1.rb
Instance Attribute Summary collapse
-
#calendar_external_id ⇒ Object
readonly
Returns the value of attribute calendar_external_id.
-
#upserting_replicator ⇒ Object
readonly
Returns the value of attribute upserting_replicator.
Instance Method Summary collapse
- #conditional_upsert? ⇒ Boolean
-
#initialize(replicator, calendar_external_id) ⇒ Upserter
constructor
A new instance of Upserter.
- #prepare_body(body) ⇒ Object
- #upsert_page_size ⇒ Object
Methods included from Backfiller::Bulk
#dry_run?, #flush_pending_inserts, #handle_item, #pending_inserts, #remote_key_column_name
Constructor Details
#initialize(replicator, calendar_external_id) ⇒ Upserter
Returns a new instance of Upserter.
152 153 154 155 |
# File 'lib/webhookdb/replicator/icalendar_calendar_v1.rb', line 152 def initialize(replicator, calendar_external_id) @upserting_replicator = replicator @calendar_external_id = calendar_external_id end |
Instance Attribute Details
#calendar_external_id ⇒ Object (readonly)
Returns the value of attribute calendar_external_id.
150 151 152 |
# File 'lib/webhookdb/replicator/icalendar_calendar_v1.rb', line 150 def calendar_external_id @calendar_external_id end |
#upserting_replicator ⇒ Object (readonly)
Returns the value of attribute upserting_replicator.
150 151 152 |
# File 'lib/webhookdb/replicator/icalendar_calendar_v1.rb', line 150 def upserting_replicator @upserting_replicator end |
Instance Method Details
#conditional_upsert? ⇒ Boolean
158 |
# File 'lib/webhookdb/replicator/icalendar_calendar_v1.rb', line 158 def conditional_upsert? = true |
#prepare_body(body) ⇒ Object
160 161 162 |
# File 'lib/webhookdb/replicator/icalendar_calendar_v1.rb', line 160 def prepare_body(body) body["calendar_external_id"] = @calendar_external_id end |
#upsert_page_size ⇒ Object
157 |
# File 'lib/webhookdb/replicator/icalendar_calendar_v1.rb', line 157 def upsert_page_size = 500 |