How do I test for non-null in Ruby::Sequel?

ruby, sequel

Solution

You can use `exclude` instead of `where`.

User.select(...).exclude(name: nil)

Problem

I'm looking to do something like ``` User.select(...).where(:name != nil) ``` without writing something like ``` User.select(...).to_a.find_all {|user| user.name} ``` I can select for null values, but not for non-null. Is there a trick, or outside Sequel's domain?

Original source