Sha256: 7b38a8f779f953aee1b7771650dbd47ee3b8fdeabc7ae6db9fe3a3a1664bb31a

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

module FilterParam
  module Operators
    class CaseInsensitiveEqual < FieldFilterOperator
      operator_tag :eq_ci
      operand_data_type :string

      def self.sql(field, literal)
        super

        "lower(#{field.actual_name}) = #{sql_quote(literal.value.downcase)}"
      end
    end
  end
end

FilterParam::Operator.register(FilterParam::Operators::CaseInsensitiveEqual)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
filter_param-0.1.2 lib/filter_param/operators/case_insensitive_equal.rb