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


49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/mobility/plugins/arel/nodes/pg_ops.rb', line 49

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


41
42
43
# File 'lib/mobility/plugins/arel/nodes/pg_ops.rb', line 41

def to_dash_arrow
  JsonbDashArrow.new left, right
end

#to_questionObject


45
46
47
# File 'lib/mobility/plugins/arel/nodes/pg_ops.rb', line 45

def to_question
  JsonbQuestion.new left, right
end