Sha256: 50b9d2dd232141baf4ff6a14e2641b4fbdc332e8c9b110133d1aba992cbb3e62

Contents?: true

Size: 1.32 KB

Versions: 4

Compression:

Stored size: 1.32 KB

Contents

require 'plain_model/querying/base'
require 'plain_model/querying/with_model'
require_relative 'querying/select'
require_relative 'querying/from'
require_relative 'querying/where'
require_relative 'querying/order_by'
require_relative 'querying/group_by'
require_relative 'querying/having'
require_relative 'querying/limit'
require_relative 'querying/union'
require_relative 'querying/array_join'
require_relative 'querying/page'
require_relative 'querying/scope'
require_relative 'querying/except'
require_relative 'querying/collect'

module ActiveHouse
  class QueryBuilder
    include PlainModel::Querying::Base
    include PlainModel::Querying::WithModel

    include ActiveHouse::Querying::Select
    include ActiveHouse::Querying::From
    include ActiveHouse::Querying::Where
    include ActiveHouse::Querying::OrderBy
    include ActiveHouse::Querying::GroupBy
    include ActiveHouse::Querying::Having
    include ActiveHouse::Querying::Limit
    include ActiveHouse::Querying::Union
    include ActiveHouse::Querying::ArrayJoin
    include ActiveHouse::Querying::Scope
    include ActiveHouse::Querying::Page
    include ActiveHouse::Querying::Except
    include ActiveHouse::Querying::Collect

    # allows using query without model_class
    def initialize(model_class = nil)
      super(model_class || ActiveHouse::Model)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_house-0.8.0 lib/active_house/query_builder.rb
active_house-0.7.0 lib/active_house/query_builder.rb
active_house-0.6.6 lib/active_house/query_builder.rb
active_house-0.6.5 lib/active_house/query_builder.rb