Class: Webhookdb::Replicator::IcalendarEventV1Partitioned

Inherits:
IcalendarEventV1 show all
Includes:
PartitionableMixin
Defined in:
lib/webhookdb/replicator/icalendar_event_v1_partitioned.rb

Constant Summary

Constants included from PartitionableMixin

PartitionableMixin::MAX_16BIT_INT

Constants inherited from IcalendarEventV1

Webhookdb::Replicator::IcalendarEventV1::ARRAY_KEYS, Webhookdb::Replicator::IcalendarEventV1::CONV_COMMA_SEP_ARRAY, Webhookdb::Replicator::IcalendarEventV1::CONV_DATE, Webhookdb::Replicator::IcalendarEventV1::CONV_DATETIME, Webhookdb::Replicator::IcalendarEventV1::CONV_GEO_LAT, Webhookdb::Replicator::IcalendarEventV1::CONV_GEO_LNG, Webhookdb::Replicator::IcalendarEventV1::CONV_MISSING_TZ, Webhookdb::Replicator::IcalendarEventV1::CONV_REMOTE_KEY, Webhookdb::Replicator::IcalendarEventV1::LINE, Webhookdb::Replicator::IcalendarEventV1::NAME, Webhookdb::Replicator::IcalendarEventV1::PARAM, Webhookdb::Replicator::IcalendarEventV1::PTEXT, Webhookdb::Replicator::IcalendarEventV1::PVALUE, Webhookdb::Replicator::IcalendarEventV1::QSTR, Webhookdb::Replicator::IcalendarEventV1::VALUE

Constants inherited from Base

Base::MAX_INDEX_NAME_LENGTH

Constants included from DBAdapter::ColumnTypes

DBAdapter::ColumnTypes::BIGINT, DBAdapter::ColumnTypes::BIGINT_ARRAY, DBAdapter::ColumnTypes::BOOLEAN, DBAdapter::ColumnTypes::COLUMN_TYPES, DBAdapter::ColumnTypes::DATE, DBAdapter::ColumnTypes::DECIMAL, DBAdapter::ColumnTypes::DOUBLE, DBAdapter::ColumnTypes::FLOAT, DBAdapter::ColumnTypes::INTEGER, DBAdapter::ColumnTypes::INTEGER_ARRAY, DBAdapter::ColumnTypes::OBJECT, DBAdapter::ColumnTypes::TEXT, DBAdapter::ColumnTypes::TEXT_ARRAY, DBAdapter::ColumnTypes::TIMESTAMP, DBAdapter::ColumnTypes::UUID

Instance Attribute Summary

Attributes inherited from Base

#service_integration

Class Method Summary collapse

Instance Method Summary collapse

Methods included from PartitionableMixin

#_prepare_for_insert, #_str2inthash, #_upsert_conflict_target, #existing_partitions, #partition?, #partition_align_name, #partition_suffix, #partitioning

Methods inherited from IcalendarEventV1

_compact_vevent_lines, #_extra_index_specs, _parse_line, _parse_time_with_tzid, #_prepare_for_insert, #_remote_key_column, #_resource_and_event, #_resource_to_data, #_set_implicit_end_at, #_set_implicit_end_date, #_timestamp_column_name, #_update_where_expr, #_webhook_response, #backfill_not_supported_message, #calculate_webhook_state_machine, #documentation_url, entry_is_date_str?, entry_to_date, entry_to_date_or_datetime, entry_to_datetime, #on_dependency_webhook_upsert, #stale_row_deleter, value_is_date_str?, vevent_to_hash

Methods inherited from Base

#_any_subscriptions_to_notify?, #_backfill_state_change_fields, #_backfillers, #_clear_backfill_information, #_clear_webook_information, #_coalesce_excluded_on_update, #_enqueue_backfill_jobs, #_extra_index_specs, #_fetch_enrichment, #_find_dependency_candidate, #_notify_dependents, #_parallel_backfill, #_prepare_for_insert, #_publish_rowupsert, #_remote_key_column, #_resource_and_event, #_resource_to_data, #_store_enrichment_body?, #_timestamp_column_name, #_to_json, #_update_where_expr, #_upsert_conflict_target, #_upsert_update_expr, #_upsert_webhook, #_upsert_webhook_single_resource, #_verify_backfill_err_msg, #_webhook_response, #_webhook_state_change_fields, #admin_dataset, #avoid_writes?, #backfill, #backfill_not_supported_message, #calculate_and_backfill_state_machine, #calculate_backfill_state_machine, #calculate_dependency_state_machine_step, #calculate_preferred_create_state_machine, #calculate_webhook_state_machine, chunked_row_update_bounds, #clear_backfill_information, #clear_webhook_information, #create_table, #create_table_modification, #create_table_partitions, #data_column, #dbadapter_table, #denormalized_columns, #descriptor, #dispatch_request_to, #documentation_url, #enqueue_sync_targets, #enrichment_column, #ensure_all_columns, #ensure_all_columns_modification, #existing_partitions, #find_dependent, #find_dependent!, #indices, #initialize, #on_backfill_error, #on_dependency_webhook_upsert, #partition?, #partitioning, #preferred_create_state_machine_method, #preprocess_headers_for_logging, #primary_key_column, #process_state_change, #process_webhooks_synchronously?, #qualified_table_sequel_identifier, #readonly_dataset, #remote_key_column, #requires_sequence?, #resource_name_plural, #resource_name_singular, #schema_and_table_symbols, #storable_columns, #synchronous_processing_response_body, #timestamp_column, #upsert_has_deps?, #upsert_webhook, #upsert_webhook_body, #verify_backfill_credentials, #webhook_endpoint, #webhook_response, #with_advisory_lock

Constructor Details

This class inherits a constructor from Webhookdb::Replicator::Base

Class Method Details

.descriptorWebhookdb::Replicator::Descriptor



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/webhookdb/replicator/icalendar_event_v1_partitioned.rb', line 10

def self.descriptor
  return Webhookdb::Replicator::Descriptor.new(
    name: "icalendar_event_v1_partitioned",
    ctor: ->(sint) { self.new(sint) },
    dependency_descriptor: Webhookdb::Replicator::IcalendarCalendarV1.descriptor,
    feature_roles: ["partitioning_beta"],
    resource_name_singular: "iCalendar Event",
    supports_webhooks: true,
    description: "Individual events in an icalendar, using partitioned tables rather than one big table. " \
                 "See icalendar_calendar_v1.",
    api_docs_url: "https://icalendar.org/",
  )
end

Instance Method Details

#_denormalized_columnsObject



24
25
26
27
28
# File 'lib/webhookdb/replicator/icalendar_event_v1_partitioned.rb', line 24

def _denormalized_columns
  d = super
  d << Webhookdb::Replicator::Column.new(:calendar_external_hash, INTEGER, optional: true)
  return d
end

#partition_column_nameObject



31
# File 'lib/webhookdb/replicator/icalendar_event_v1_partitioned.rb', line 31

def partition_column_name = :calendar_external_hash

#partition_methodObject



30
# File 'lib/webhookdb/replicator/icalendar_event_v1_partitioned.rb', line 30

def partition_method = Webhookdb::DBAdapter::Partitioning::HASH

#partition_value(resource) ⇒ Object



32
# File 'lib/webhookdb/replicator/icalendar_event_v1_partitioned.rb', line 32

def partition_value(resource) = self._str2inthash(resource.fetch("calendar_external_id"))