How do I retrieve John Doe and Will Smith without also retrieving John Smith in one database round-trip?
DB_ROM.relations[:names]
.where do
(first_name.ilike('John') & last_name.ilike('Doe')) |
(first_name.ilike('Will') & last_name.ilike('Smith'))
end.to_a
More info: https://rom-rb.org/learn/sql/3.3/queries/