Method: Webhookdb::Replicator::Base#_update_where_expr

Defined in:
lib/webhookdb/replicator/base.rb

#_update_where_exprSequel::SQL::Expression

This method is abstract.

The argument for insert_conflict update_where clause. Used to conditionally update, like updating only if a row is newer than what’s stored. We must always have an ‘update where’ because we never want to overwrite with the same data as exists.

If an integration does not have any way to detect if a resource changed, it can compare data columns.

Examples:

With a meaningful timestmap

self.qualified_table_sequel_identifier[:updated_at] < Sequel[:excluded][:updated_at]

Without a meaingful timestamp

self.qualified_table_sequel_identifier[:data] !~ Sequel[:excluded][:data]

Raises:

  • (NotImplementedError)


775
776
777
# File 'lib/webhookdb/replicator/base.rb', line 775

def _update_where_expr
  raise NotImplementedError
end