This idea has been kicked around a whole lot, I know. In IRC. Dark alleyways. Sweaty dance halls. Courts of law. It’s this: instead of writing SQL, write Ruby. Generate the SQL behind the curtain. Something like this: User.detect { |u| u.name == 'Jericho' && u.age == 22 } Or this: User.select { |u| [1, 2, 3, 4].include? u.id } Or even this: User.select { |u| u.name =~ 'rick' }.sort_by(&:age) It’d