Class: Arel::Nodes::JSONBHashArrow
Overview
Instance Attribute Summary
#name, #relation
Instance Method Summary
collapse
#initialize
Instance Method Details
#contains(value) ⇒ Object
12
13
14
|
# File 'lib/arel/nodes/jsonb_hash_arrow.rb', line 12
def contains(value)
Arel::Nodes::JSONBAtArrow.new(relation, self, value)
end
|
#intersects_with(array) ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/arel/nodes/jsonb_hash_arrow.rb', line 16
def intersects_with(array)
::Arel::Nodes::InfixOperation.new(
'>',
::Arel::Nodes::NamedFunction.new(
'jsonb_array_length',
[Arel::Nodes::JSONBDoublePipe.new(relation, self, array)]
),
0
)
end
|
#operator ⇒ Object
4
5
6
|
# File 'lib/arel/nodes/jsonb_hash_arrow.rb', line 4
def operator
'#>'
end
|
#right_side ⇒ Object
8
9
10
|
# File 'lib/arel/nodes/jsonb_hash_arrow.rb', line 8
def right_side
::Arel::Nodes::SqlLiteral.new("'{#{name}}'")
end
|