Class: ConceptQL::Nodes::DateRange
- Defined in:
- lib/conceptql/nodes/date_range.rb
Overview
Represents a node that will create a date_range for every person in the database
Accepts two params: start and end formateed as ‘YYYY-MM-DD’ or ‘START’ or ‘END’ ‘START’ represents the first date of data in the data source, ‘END’ represents the last date of data in the data source,
Constant Summary
Constants inherited from Node
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
#arguments, #children, #columns, #date_columns, #evaluate, #initialize, #select_it, #stream
Constructor Details
This class inherits a constructor from ConceptQL::Nodes::Node
Instance Method Details
#query(db) ⇒ Object
11 12 13 14 |
# File 'lib/conceptql/nodes/date_range.rb', line 11 def query(db) db.from(:person) .select_append(Sequel.expr(start_date(db)).cast(:date).as(:start_date),Sequel.expr(end_date(db)).cast(:date).as(:end_date)).from_self end |
#types ⇒ Object
16 17 18 |
# File 'lib/conceptql/nodes/date_range.rb', line 16 def types [:person] end |