module TableSync

Constants

Error
ORMNotSupported
PluginError

@api public @since 2.2.0

UndefinedEvent
VERSION

Attributes

batch_publishing_job_class_callable[RW]
exchange_name[RW]
notifier[RW]
orm[R]
publishing_adapter[R]
publishing_job_class_callable[RW]
receiving_model[R]
routing_key_callable[RW]
routing_metadata_callable[RW]

Public Class Methods

orm=(val) click to toggle source
# File lib/table_sync.rb, line 36
def orm=(val)
  case val
  when :active_record
    @publishing_adapter = Publishing::ORMAdapter::ActiveRecord
    @receiving_model = Receiving::Model::ActiveRecord
  when :sequel
    @publishing_adapter = Publishing::ORMAdapter::Sequel
    @receiving_model = Receiving::Model::Sequel
  else
    raise ORMNotSupported.new(val.inspect)
  end

  @orm = val
end
sync(klass, **opts) click to toggle source
# File lib/table_sync.rb, line 32
def sync(klass, **opts)
  publishing_adapter.setup_sync(klass, opts)
end