Files

Class Index [+]

Quicksearch

Arel::Where

Attributes

predicates[R]

Public Class Methods

new(relation, predicates) click to toggle source
    # File lib/arel/algebra/relations/operations/where.rb, line 5
 5:     def initialize(relation, predicates)
 6:       super(relation)
 7:       @predicates = predicates.respond_to?(:map) ?
 8:         predicates.map { |p| p.bind(relation) } : [predicates.bind(relation)]
 9:       @wheres = nil
10:     end

Public Instance Methods

eval() click to toggle source
    # File lib/arel/algebra/relations/operations/where.rb, line 16
16:     def eval
17:       unoperated_rows.select { |row| predicates.all? { |p| p.eval(row) } }
18:     end
to_sql(formatter = nil) click to toggle source
    # File lib/arel/algebra/relations/operations/where.rb, line 20
20:     def to_sql(formatter = nil)
21:       compiler.select_sql
22:     end
wheres() click to toggle source
    # File lib/arel/algebra/relations/operations/where.rb, line 12
12:     def wheres
13:       @wheres ||= relation.wheres + predicates
14:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.