Class: ActiveHouse::QueryBuilder

Instance Method Summary collapse

Methods included from ActiveHouse::Querying::Collect

#build_query, #collection, #count, #fetch_collection, #group_values, #klass, #loaded?, #pluck, #query_parts, #reset, #to_a, #to_hashes, #to_query

Methods included from ActiveHouse::Querying::Page

#initial_values, #page, #page!, #per

Methods included from ActiveHouse::Querying::Scope

#_apply_default_scope, #apply_scope, #method_missing, #respond_to_missing?, #scope?

Methods included from ActiveHouse::Querying::ArrayJoin

#array_join, #array_join!, #build_array_join_query_part, #initial_values, #left_array_join, #left_array_join!

Methods included from ActiveHouse::Querying::Union

#build_union_query_part, #except_union, #except_union!, #format_unions, #initial_values, #union, #union!, #update_union

Methods included from ActiveHouse::Querying::Limit

#build_limit_query_part, #initial_values, #limit, #limit!

Methods included from ActiveHouse::Querying::Having

#build_having_query_part, #format_having, #having, #having!, #initial_values

Methods included from ActiveHouse::Querying::GroupBy

#build_group_by_query_part, #group_by, #group_by!, #initial_values

Methods included from ActiveHouse::Querying::OrderBy

#build_order_by_query_part, #format_order_clauses, #format_order_hash, #initial_values, #order_by, #order_by!

Methods included from ActiveHouse::Querying::Where

#build_where_query_part, #format_where_clauses, #initial_values, #where, #where!, #where_not, #where_not!

Methods included from ActiveHouse::Querying::From

#build_from_query_part, #from, #from!, #from_subquery

Methods included from ActiveHouse::Querying::Select

#build_select_query_part, #initial_values, #select, #select!

Constructor Details

#initialize(model_class = nil) ⇒ QueryBuilder

allows using query without model_class



37
38
39
# File 'lib/active_house/query_builder.rb', line 37

def initialize(model_class = nil)
  super(model_class || ActiveHouse::Model)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveHouse::Querying::Scope