activecube 0.1.31 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/activecube/query/item.rb +4 -3
- data/lib/activecube/query/selector.rb +6 -1
- data/lib/activecube/version.rb +1 -1
- 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: bafdfeabff735168eac514c7a3fa3d80c70e74fcb43372d9110eec9dd58d2eb8
|
4
|
+
data.tar.gz: 45f11a99a45eafaf84a127b2e5328ae77515d835122c000669c66fe06a0777a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2faf2c565024c87ddd2045eb644ded72158ebeeec8ce200cd2937d428961a36a8f61c1d3ab83a433ab423a3270ec4af58d5b36f8d17bb99a2d7af2f0505c91a
|
7
|
+
data.tar.gz: 27da45c79d812fabb3d59a53d2739db1ae7dde7bd6377be3ca00a7733e0ed169719416b49c9bfefc9a6b3c572a5f4ec3d9c8518f8b78a3e9b05f99f015d8eba8
|
data/Gemfile.lock
CHANGED
@@ -22,9 +22,6 @@ module Activecube::Query
|
|
22
22
|
"#{definition.class.name}(#{key})"
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
25
|
def append_with! model, cube_query, table, query
|
29
26
|
|
30
27
|
if definition.respond_to?(:with_expression) &&
|
@@ -36,6 +33,10 @@ module Activecube::Query
|
|
36
33
|
query
|
37
34
|
end
|
38
35
|
|
36
|
+
private
|
37
|
+
|
38
|
+
|
39
|
+
|
39
40
|
def try_append_with(query, key, expr)
|
40
41
|
expr = Arel.sql(expr) if expr.kind_of?(String)
|
41
42
|
if (with = query.ast.with)
|
@@ -32,7 +32,11 @@ module Activecube::Query
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def append_query model, cube_query, arel_table, query
|
35
|
-
|
35
|
+
|
36
|
+
@selectors.each do |s|
|
37
|
+
query = s.append_with!(model, cube_query, arel_table, query)
|
38
|
+
end
|
39
|
+
|
36
40
|
query.where expression(model, arel_table, cube_query)
|
37
41
|
end
|
38
42
|
|
@@ -111,6 +115,7 @@ module Activecube::Query
|
|
111
115
|
end
|
112
116
|
|
113
117
|
def append_query model, cube_query, table, query
|
118
|
+
query = append_with!(model, cube_query, table, query)
|
114
119
|
query.where(expression model, table, cube_query)
|
115
120
|
end
|
116
121
|
|
data/lib/activecube/version.rb
CHANGED