quo 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/quo/query.rb +1 -2
- data/lib/quo/query_composer.rb +1 -1
- data/lib/quo/utilities/compose.rb +1 -1
- data/lib/quo/version.rb +1 -1
- data/sig/quo.rbs +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3278d72f55569eb93fb569185467cd4b327ffd157e249c8538d4a643c652443c
|
4
|
+
data.tar.gz: e936c5fd0de429b941e110c273cb12ff302079095ab0f3d7d38023718b80b5e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4adcb23af540cf2db462bd21640aef4497c1f2509a1ac6968a5a15b1cd2004d7db9935638ba5496eb57ffc655ad515688fc9468a191d17b32735da1a7c652705
|
7
|
+
data.tar.gz: f99119cdf52a97e956317a530e9074e12b07816405f6dd5fd80f74665dd34c0294368ed6d6a7d88f8147484486f52606462864663357e430ca2eebc36b7372d7
|
data/lib/quo/query.rb
CHANGED
@@ -41,7 +41,7 @@ module Quo
|
|
41
41
|
|
42
42
|
# Combine (compose) this query object with another composeable entity, see notes for `.compose` above.
|
43
43
|
# Compose is aliased as `+`. Can optionally take `joins()` parameters to perform a joins before the merge
|
44
|
-
def compose(right, joins
|
44
|
+
def compose(right, joins: nil)
|
45
45
|
Quo::QueryComposer.new(self, right, joins).compose
|
46
46
|
end
|
47
47
|
|
@@ -252,7 +252,6 @@ module Quo
|
|
252
252
|
rel = rel.limit(@options[:limit]) if @options[:limit].present?
|
253
253
|
rel = rel.preload(@options[:preload]) if @options[:preload].present?
|
254
254
|
rel = rel.includes(@options[:includes]) if @options[:includes].present?
|
255
|
-
rel = rel.joins(@options[:joins]) if @options[:joins].present?
|
256
255
|
rel = rel.select(@options[:select]) if @options[:select].present?
|
257
256
|
end
|
258
257
|
rel
|
data/lib/quo/query_composer.rb
CHANGED
@@ -6,7 +6,7 @@ module Quo
|
|
6
6
|
# These can be Quo::Query, Quo::MergedQuery, Quo::EagerQuery and ActiveRecord::Relations.
|
7
7
|
# See the `README.md` docs for more details.
|
8
8
|
module Compose
|
9
|
-
def compose(query1, query2, joins
|
9
|
+
def compose(query1, query2, joins: nil)
|
10
10
|
Quo::QueryComposer.new(query1, query2, joins).compose
|
11
11
|
end
|
12
12
|
|
data/lib/quo/version.rb
CHANGED
data/sig/quo.rbs
CHANGED
@@ -27,7 +27,7 @@ module Quo
|
|
27
27
|
# Combine two query-like or composeable entities:
|
28
28
|
# These can be Quo::Query, Quo::MergedQuery, Quo::EagerQuery and ActiveRecord::Relations.
|
29
29
|
# See the `README.md` docs for more details.
|
30
|
-
def compose: (composable query1, composable query2, ?untyped?
|
30
|
+
def compose: (composable query1, composable query2, ?joins: untyped?) -> Quo::MergedQuery
|
31
31
|
|
32
32
|
# Determines if the object `query` is something which can be composed with query objects
|
33
33
|
def composable_with?: (merge_composable query) -> bool
|
@@ -90,7 +90,7 @@ module Quo
|
|
90
90
|
|
91
91
|
def initialize: (**untyped options) -> void
|
92
92
|
def query: () -> composable
|
93
|
-
def compose: (composable right, ?untyped?
|
93
|
+
def compose: (composable right, ?joins: untyped?) -> Quo::MergedQuery
|
94
94
|
alias + compose
|
95
95
|
|
96
96
|
def copy: (**untyped options) -> query
|