Class: Arel::Sql::Attribute

Inherits:
WhereCondition show all
Defined in:
lib/arel/engines/sql/formatters.rb

Instance Attribute Summary

Attributes inherited from Formatter

#christener, #engine, #environment

Instance Method Summary collapse

Methods inherited from WhereCondition

#attribute, #expression, #select, #value

Methods inherited from Formatter

#initialize, #name_for, #quote, #quote_column_name, #quote_table_name

Constructor Details

This class inherits a constructor from Arel::Sql::Formatter

Instance Method Details

#range(left, right) ⇒ Object



130
131
132
# File 'lib/arel/engines/sql/formatters.rb', line 130

def range(left, right)
  "#{scalar(left)} AND #{scalar(right)}"
end

#scalar(scalar) ⇒ Object



126
127
128
# File 'lib/arel/engines/sql/formatters.rb', line 126

def scalar(scalar)
  quote(scalar, environment.column)
end