Skip to content

Commit

Permalink
Add JsonbDashDoubleArrow
Browse files Browse the repository at this point in the history
  • Loading branch information
shioyama committed May 29, 2018
1 parent a83f6f6 commit b5800df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/mobility/arel/nodes/pg_ops.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module Nodes
JsonDashArrow
JsonDashDoubleArrow
JsonbDashArrow
JsonbDashDoubleArrow
JsonbQuestion
HstoreDashArrow
HstoreQuestion
Expand Down Expand Up @@ -43,7 +44,7 @@ def quoted_node(other)

class Jsonb < JsonbDashArrow
def matches *args
JsonDashDoubleArrow.new(left, right).matches(*args)
JsonbDashDoubleArrow.new(left, right).matches(*args)
end

def lower
Expand Down Expand Up @@ -88,6 +89,10 @@ def visit_Mobility_Arel_Nodes_JsonbDashArrow o, a
json_infix o, a, '->'
end

def visit_Mobility_Arel_Nodes_JsonbDashDoubleArrow o, a
json_infix o, a, '->>'
end

def visit_Mobility_Arel_Nodes_JsonbQuestion o, a
json_infix o, a, '?'
end
Expand Down

0 comments on commit b5800df

Please sign in to comment.