Module: MultipleQuery

Defined in:
lib/relata/dsl/querys/multiple.rb

Instance Method Summary collapse

Instance Method Details

#add_filter(expectation) ⇒ Object



5
6
7
# File 'lib/relata/dsl/querys/multiple.rb', line 5

def add_filter expectation
  query.group(@groups.first).having("#{@relation_search} #{expectation}") 
end

#queryObject



2
3
4
# File 'lib/relata/dsl/querys/multiple.rb', line 2

def query
  preload(@start_field).select(@select_fields.join ',').from("#{table_name}, #{@start_field}").where("#{table_name}.id = #{@start_field}.post_id")
end