Method: Sequel::Postgres::DatasetMethods#merge_do_nothing_when_matched
- Defined in:
- lib/sequel/adapters/shared/postgres.rb
#merge_do_nothing_when_matched(&block) ⇒ Object
Return a dataset with a WHEN MATCHED THEN DO NOTHING clause added to the MERGE 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_matched
# WHEN MATCHED THEN DO NOTHING
merge_do_nothing_when_matched{a > 30}
# WHEN MATCHED AND (a > 30) THEN DO NOTHING
2352 2353 2354 |
# File 'lib/sequel/adapters/shared/postgres.rb', line 2352 def merge_do_nothing_when_matched(&block) _merge_when(:type=>:matched, &block) end |