Sha256: 5c535dc0e99997696a4917f359029eef3ef1f674237d6d88ba0eb8deff6f63ee
Contents?: true
Size: 796 Bytes
Versions: 10
Compression:
Stored size: 796 Bytes
Contents
# rubocop:disable Naming/MethodName # rubocop:disable Naming/UncommunicativeMethodParamName module Arel if Gem.loaded_specs.key?('postgres_ext') module Visitors module ContainsPatch def visit_Arel_Nodes_Contains(o, collector) if o.left.is_a?(Arel::Attribute) super else infix_value o, collector, ' @> ' end end end PostgreSQL.prepend(ContainsPatch) end else module Nodes # https://www.postgresql.org/docs/9.1/functions-array.html class Contains < Arel::Nodes::InfixOperation def initialize(left, right) super(:'@>', left, right) end end end end end # rubocop:enable Naming/MethodName # rubocop:enable Naming/UncommunicativeMethodParamName
Version data entries
10 entries across 10 versions & 1 rubygems