Class: AssociateJsonb::ArelNodes::SqlCastedBinary

Inherits:
Arel::Nodes::Binary
  • Object
show all
Defined in:
lib/associate_jsonb/arel_nodes/sql_casted_binary.rb

Direct Known Subclasses

SqlCastedEquality

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, cast_as, right) ⇒ SqlCastedBinary

Returns a new instance of SqlCastedBinary.



8
9
10
11
12
13
14
15
16
17
# File 'lib/associate_jsonb/arel_nodes/sql_casted_binary.rb', line 8

def initialize(left, cast_as, right)
  @original_left = left
  super(
    ::Arel::Nodes::NamedFunction.new(
      "CAST",
      [ left.as(cast_as) ]
    ),
    right
  )
end

Instance Attribute Details

#original_leftObject (readonly)

Returns the value of attribute original_left.



7
8
9
# File 'lib/associate_jsonb/arel_nodes/sql_casted_binary.rb', line 7

def original_left
  @original_left
end