Class: Mobility::Plugins::Arel::Nodes::Jsonb

Inherits:
JsonbDashDoubleArrow
  • Object
show all
Defined in:
lib/mobility/plugins/arel/nodes/pg_ops.rb

Direct Known Subclasses

JsonbContainer

Instance Method Summary collapse

Instance Method Details

#eq(other) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/mobility/plugins/arel/nodes/pg_ops.rb', line 38

def eq other
  case other
  when NilClass
    to_question.not
  when Integer, Array, ::Hash
    to_dash_arrow.eq other.to_json
  when Jsonb
    to_dash_arrow.eq other.to_dash_arrow
  when JsonbDashArrow
    to_dash_arrow.eq other
  else
    super
  end
end

#to_dash_arrowObject



30
31
32
# File 'lib/mobility/plugins/arel/nodes/pg_ops.rb', line 30

def to_dash_arrow
  JsonbDashArrow.new left, right
end

#to_questionObject



34
35
36
# File 'lib/mobility/plugins/arel/nodes/pg_ops.rb', line 34

def to_question
  JsonbQuestion.new left, right
end