Method: ROM::SQL::Relation::Reading#invert

Defined in:
lib/rom/sql/relation/reading.rb

#invertRelation

Inverts the current WHERE and HAVING clauses. If there is neither a WHERE or HAVING clause, adds a WHERE clause that is always false.

Examples:

users.exclude(name: 'Jane').invert

# this is the same as:
users.where(name: 'Jane')

Returns:



416
417
418
# File 'lib/rom/sql/relation/reading.rb', line 416

def invert
  new(dataset.invert)
end