Class: AssociateJsonb::ArelNodes::Jsonb::BindableOperator

Inherits:
Operator
  • Object
show all
Defined in:
lib/associate_jsonb/arel_nodes/jsonb/bindable_operator.rb

Direct Known Subclasses

AtArrow, DoublePipe

Instance Attribute Summary

Attributes inherited from Operator

#name, #relation

Instance Method Summary collapse

Methods inherited from Operator

#initialize, #operator

Constructor Details

This class inherits a constructor from AssociateJsonb::ArelNodes::Jsonb::Operator

Instance Method Details

#right_sideObject



8
9
10
11
12
13
# File 'lib/associate_jsonb/arel_nodes/jsonb/bindable_operator.rb', line 8

def right_side
  return name if name.is_a?(::Arel::Nodes::BindParam) ||
                 name.is_a?(::Arel::Nodes::SqlLiteral)

  ::Arel::Nodes::SqlLiteral.new("'#{name.as_json}'")
end