active_house 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50733d5482718e12146c8c79d9c4d372df311268
4
- data.tar.gz: e3d33e478537b2a0a04e9f02dd970d4c823432c4
3
+ metadata.gz: aba219aae4f2cb3ba08c8440b242058347c26df7
4
+ data.tar.gz: c591c24a4c0ec08dceab1ea5c70ffc6a77f768e1
5
5
  SHA512:
6
- metadata.gz: c52e1158125f806bdd6f8547ba2cd64cc6b2426c9b5c1a3993fc00cf6802b890d3c8d490ccbb3968042778a4a6b1709ff95bb0f28d1572c07530dcb71d00bdc7
7
- data.tar.gz: 77f1afc5c493e9ca5fd372763dedaf5036eb0bf22a59c10a5117c435b7abfdd45c04dc63fbb2029b6d0c7cea8210a51673b4bff3f9015e100a722e4e279ea46c
6
+ metadata.gz: 1ac453090a26362fece0925c7b86aebb9fb1211b8593547e104fcd06898b0e63e94747bd077582a0a8da79712fe88850ca2d11a7067bdf9041fda524e931e3e2
7
+ data.tar.gz: b1cc1836e95fb36af843cf390a87883fcb99b61279d39066a0590a2dd8ed33b1b2253da73343de1393e3a8e0f69d7af6b5243737dc2c9dd9de32b5956a2eb0ba
@@ -1,5 +1,4 @@
1
1
  require 'plain_model/querying/base'
2
- require 'plain_model/querying/except'
3
2
  require 'plain_model/querying/with_model'
4
3
  require_relative 'querying/select'
5
4
  require_relative 'querying/from'
@@ -12,12 +11,12 @@ require_relative 'querying/union'
12
11
  require_relative 'querying/array_join'
13
12
  require_relative 'querying/page'
14
13
  require_relative 'querying/scope'
14
+ require_relative 'querying/except'
15
15
  require_relative 'querying/collect'
16
16
 
17
17
  module ActiveHouse
18
18
  class QueryBuilder
19
19
  include PlainModel::Querying::Base
20
- include PlainModel::Querying::Except
21
20
  include PlainModel::Querying::WithModel
22
21
 
23
22
  include ActiveHouse::Querying::Select
@@ -31,6 +30,7 @@ module ActiveHouse
31
30
  include ActiveHouse::Querying::ArrayJoin
32
31
  include ActiveHouse::Querying::Scope
33
32
  include ActiveHouse::Querying::Page
33
+ include ActiveHouse::Querying::Except
34
34
  include ActiveHouse::Querying::Collect
35
35
 
36
36
  # allows using query without model_class
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/concern'
4
+
5
+ module ActiveHouse
6
+ module Querying
7
+ module Except
8
+ extend ActiveSupport::Concern
9
+
10
+ # Chain method
11
+ # @param keys [Array<Symbol>] values keys that you want to exclude from query
12
+ # @return new instance with applied changes
13
+ def except(*keys)
14
+ dup.except!(*keys)
15
+ end
16
+
17
+ # Chain method
18
+ # @param keys [Array<Symbol>] values keys that you want to exclude from query
19
+ # @return new instance with applied changes
20
+ def except!(*keys)
21
+ values.merge! initial_values.slice(*keys)
22
+ self
23
+ end
24
+
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiveHouse
2
- VERSION = '0.6.4'.freeze
2
+ VERSION = '0.6.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_house
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
@@ -154,6 +154,7 @@ files:
154
154
  - lib/active_house/query_builder.rb
155
155
  - lib/active_house/querying/array_join.rb
156
156
  - lib/active_house/querying/collect.rb
157
+ - lib/active_house/querying/except.rb
157
158
  - lib/active_house/querying/from.rb
158
159
  - lib/active_house/querying/group_by.rb
159
160
  - lib/active_house/querying/having.rb