def conditions
      return ['1=0'] if !valid?

      if @val.blank?
        []
      else
        # FIXME: assume type is just string
        op  = '=?'
        val = @val
        if val =~ /\*$/
          op  = ' like ?'
          val = @val.gsub(/\*/, '%')
        end
        ["#{@col}#{op}", val]
      end
    end
def conditions
      return ['1=0'] if !valid?

      if @val.blank?
        []
      else
        # FIXME: assume type is just string
        op  = '=?'
        val = @val
        if val =~ /\*$/
          op  = ' like ?'
          val = @val.gsub(/\*/, '%')
        end
        ["#{@col}#{op}", val]
      end
    end
implement to generate search-conditions