graph_starter 0.14.6 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/graph_starter/asset.rb +5 -9
- data/lib/graph_starter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8ee3a54564d68390d0217398ae1580cb396d9a6
|
4
|
+
data.tar.gz: eb186700dc742741779ff24e52a70c05ef34c0bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9df04085c5e00c64caed53f08eef48da9b7d3fc81762343b5b080fd69269aa18fbc4cf18ab8bb9b79d9cc77a6948e3efd9e0a4022827967fd2e2e5127d87914
|
7
|
+
data.tar.gz: 963a1890f3dc82e0c0b9ec27c8756f881405f1d4f20d46fc2961ccb6ab5de71847bc03ffa1607b96be69b2e7e7c204829ea3d5308cbdee58f54233a6ba4be008
|
@@ -311,15 +311,11 @@ module GraphStarter
|
|
311
311
|
query, associations = if category_associations.size > 0
|
312
312
|
query = all(:asset).query
|
313
313
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
query.optional_match(clause).with(:asset, "#{"categories#{i-1} +" if i > 0} collect(category) AS categories#{i}")
|
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)
|
314
|
+
category_associations
|
315
|
+
|
316
|
+
relationship_types_cypher = category_associations.map {|name| self.associations[name].relationship_type }.join('|:')
|
317
|
+
|
318
|
+
query = query.optional_match("(asset)-[:#{relationship_types_cypher}]-(category:Asset)")
|
323
319
|
|
324
320
|
[query,
|
325
321
|
[: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.
|
4
|
+
version: 0.15.0
|
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-12-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|