Class: Arel::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/arel/algebra/value.rb,
lib/arel/engines/sql/primitives.rb,
lib/arel/engines/memory/primitives.rb

Instance Method Summary collapse

Instance Method Details

#bind(relation) ⇒ Object



6
7
8
# File 'lib/arel/algebra/value.rb', line 6

def bind(relation)
  Value.new(value, relation)
end

#equality_predicate_sqlObject



37
38
39
# File 'lib/arel/engines/sql/primitives.rb', line 37

def equality_predicate_sql
  value.equality_predicate_sql
end

#eval(row) ⇒ Object



9
10
11
# File 'lib/arel/engines/memory/primitives.rb', line 9

def eval(row)
  value
end

#exclusion_predicate_sqlObject



33
34
35
# File 'lib/arel/engines/sql/primitives.rb', line 33

def exclusion_predicate_sql
  value.exclusion_predicate_sql
end

#format(object) ⇒ Object



49
50
51
# File 'lib/arel/engines/sql/primitives.rb', line 49

def format(object)
  object.to_sql(Sql::Value.new(relation))
end

#inclusion_predicate_sqlObject



29
30
31
# File 'lib/arel/engines/sql/primitives.rb', line 29

def inclusion_predicate_sql
  value.inclusion_predicate_sql
end

#inequality_predicate_sqlObject



41
42
43
# File 'lib/arel/engines/sql/primitives.rb', line 41

def inequality_predicate_sql
  value.inequality_predicate_sql
end

#to_orderingObject



10
11
12
# File 'lib/arel/algebra/value.rb', line 10

def to_ordering
  self
end

#to_sql(formatter = Sql::WhereCondition.new(relation)) ⇒ Object



45
46
47
# File 'lib/arel/engines/sql/primitives.rb', line 45

def to_sql(formatter = Sql::WhereCondition.new(relation))
  formatter.value value
end