Class: ParadeDB::Arel::Nodes::TypeCast

Inherits:
Arel::Nodes::Node
  • Object
show all
Defined in:
lib/parade_db/arel/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expr, type_sql) ⇒ TypeCast

Returns a new instance of TypeCast.



150
151
152
153
# File 'lib/parade_db/arel/nodes.rb', line 150

def initialize(expr, type_sql)
  @expr = expr
  @type_sql = type_sql
end

Instance Attribute Details

#exprObject (readonly)

Returns the value of attribute expr.



148
149
150
# File 'lib/parade_db/arel/nodes.rb', line 148

def expr
  @expr
end

#type_sqlObject (readonly)

Returns the value of attribute type_sql.



148
149
150
# File 'lib/parade_db/arel/nodes.rb', line 148

def type_sql
  @type_sql
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


159
160
161
162
163
# File 'lib/parade_db/arel/nodes.rb', line 159

def eql?(other)
  self.class == other.class &&
    expr == other.expr &&
    type_sql == other.type_sql
end

#hashObject



155
156
157
# File 'lib/parade_db/arel/nodes.rb', line 155

def hash
  [self.class, expr, type_sql].hash
end