Method: Sequel::Postgres::DatasetMethods#merge_do_nothing_when_not_matched_by_source

Defined in:
lib/sequel/adapters/shared/postgres.rb

#merge_do_nothing_when_not_matched_by_source(&block) ⇒ Object

Return a dataset with a WHEN NOT MATCHED BY SOURCE THEN DO NOTHING clause added to the MERGE BY SOURCE statement. If a block is passed, treat it as a virtual row and use it as additional conditions for the match.

merge_do_nothing_when_not_matched_by_source
# WHEN NOT MATCHED BY SOURCE THEN DO NOTHING

merge_do_nothing_when_not_matched_by_source{a > 30}
# WHEN NOT MATCHED BY SOURCE AND (a > 30) THEN DO NOTHING


2378
2379
2380
# File 'lib/sequel/adapters/shared/postgres.rb', line 2378

def merge_do_nothing_when_not_matched_by_source(&block)
  _merge_when(:type=>:not_matched_by_source, &block)
end