Class: Torque::PostgreSQL::Arel::Nodes::Cast

Inherits:
Arel::Nodes::Binary
  • Object
show all
Includes:
Arel::AliasPredication, Arel::Expressions, Arel::Math, Arel::OrderPredications, Arel::Predications
Defined in:
lib/torque/postgresql/arel/nodes.rb

Instance Method Summary collapse

Constructor Details

#initialize(left, right, array = false) ⇒ Cast

Returns a new instance of Cast.



13
14
15
16
17
# File 'lib/torque/postgresql/arel/nodes.rb', line 13

def initialize(left, right, array = false)
  right = right.to_s
  right << '[]' if array
  super left, right
end