def define_name_predicate( field_predicate, value, field = nil )
      splitter = PredicateSplitter.new field_predicate, value

      # the default / else / fall-through is just an equality
      default_proc = ->{:eq}

      # find a better predicate, if there is one
      suffix = predicate_names.find default_proc do |suffix|
        splitter =~ suffix
      end

      # wrap the field name first, to infect the expressions so all the
      # operators work.
      field_name = Sequel.expr(field || splitter.field)

      define_singleton_method field_predicate do |value|
        send suffix, field_name, value
      end
    end
def define_name_predicate( field_predicate, value, field = nil )
      splitter = PredicateSplitter.new field_predicate, value

      # the default / else / fall-through is just an equality
      default_proc = ->{:eq}

      # find a better predicate, if there is one
      suffix = predicate_names.find default_proc do |suffix|
        splitter =~ suffix
      end

      # wrap the field name first, to infect the expressions so all the
      # operators work.
      field_name = Sequel.expr(field || splitter.field)

      define_singleton_method field_predicate do |value|
        send suffix, field_name, value
      end
    end
Convert a field_predicate (field_op format), a value and a SQL field
 name using the set of predicates, to something convertible to a Sequel
 expression.

 field_predicate:: is a key from the parameter hash. Usually name_pred, eg birth_year_gt
 value:: is the value from the parameter hash. Could be a collection.
 field:: is the name of the SQL field to use, or nil where it would default to key without its predicate.