graph_starter 0.13.7 → 0.13.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2606c830993056abd903e95e71af95ac7f119841
|
4
|
+
data.tar.gz: fc6da0e37f60084ba3277d1eda53b81d83f2ecbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79f13d45e00136102e069bd7d933ed00cc758ac2f76e94fbf0a9068141e005281403c416dfd0e6a24d6cccbe61ebefcf372c0d99a14c4927083941fb387b7104
|
7
|
+
data.tar.gz: b1806dec0a87509be74482ec525ada25c6d8cb7f1ebabf5961b75e07dfbc2bba13e967bd093e7611c2c1ca85ff77405ac64df9701e62ac4b79ccdaed657e8299
|
@@ -311,12 +311,15 @@ module GraphStarter
|
|
311
311
|
query, associations = if category_associations.size > 0
|
312
312
|
query = all(:asset).query
|
313
313
|
|
314
|
+
last_associations_var = "categories#{category_associations.size - 1}"
|
314
315
|
query = category_associations.each_with_index.inject(query) do |query, (association_name, i)|
|
315
316
|
category_association = self.associations[association_name]
|
316
317
|
clause = "(asset)#{category_association.arrow_cypher}(category:#{category_association.target_class})"
|
317
318
|
|
318
319
|
query.optional_match(clause).with(:asset, "#{"categories#{i-1} +" if i > 0} collect(category) AS categories#{i}")
|
319
|
-
end
|
320
|
+
end
|
321
|
+
.with("asset, CASE #{last_associations_var} WHEN [] THEN [null] ELSE #{last_associations_var} END AS #{last_associations_var}")
|
322
|
+
.unwind(category: last_associations_var)
|
320
323
|
|
321
324
|
[query,
|
322
325
|
[:asset, :category]]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graph_starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|