class ConceptQL::Operators::Before
Public Instance Methods
compare_all?()
click to toggle source
# File lib/conceptql/operators/before.rb, line 32 def compare_all? !(options.keys & [:within, :at_least, :occurrences]).empty? end
right_stream(db)
click to toggle source
# File lib/conceptql/operators/before.rb, line 16 def right_stream(db) unless compare_all? right.evaluate(db).from_self.group_by(:person_id).select(:person_id, Sequel.function(:max, :start_date).as(:start_date)).as(:r) else right.evaluate(db).from_self.as(:r) end end
where_clause()
click to toggle source
# File lib/conceptql/operators/before.rb, line 28 def where_clause Proc.new { l__end_date < r__start_date } end
within_column()
click to toggle source
# File lib/conceptql/operators/before.rb, line 24 def within_column :l__end_date end