neo4j-core 5.1.2 → 5.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/neo4j-core/query.rb +7 -2
- data/lib/neo4j-core/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: b087bb25ea1d82b5bbbd56620873a59c407db327
|
4
|
+
data.tar.gz: 63240c5469031bc1a91addbab8aeac72b08b4458
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d0ff6259008bd2e649513cc51a7a245d078f63948f47021a62c76547db94dac243828d20a6be5fb60c8aef168b0418c07b1d0d72d5347607a2b24a2e1a1ef1e
|
7
|
+
data.tar.gz: 67775721f5d9b6312d4e55e65a0d8329506a6ec62f6cbb70c8833e09317f303efdebdc52618efcaa9ee317b938d9c47cab6bf0aef6eab03572385d0215fde547
|
data/lib/neo4j-core/query.rb
CHANGED
@@ -199,17 +199,22 @@ module Neo4j
|
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
202
|
-
def match_nodes(hash)
|
202
|
+
def match_nodes(hash, optional_match = false)
|
203
203
|
hash.inject(self) do |query, (variable, node_object)|
|
204
204
|
neo_id = if node_object.respond_to?(:neo_id)
|
205
205
|
node_object.neo_id
|
206
206
|
else
|
207
207
|
node_object
|
208
208
|
end
|
209
|
-
|
209
|
+
match_method = optional_match ? :optional_match : :match
|
210
|
+
query.send(match_method, variable).where(variable => {neo_id: neo_id})
|
210
211
|
end
|
211
212
|
end
|
212
213
|
|
214
|
+
def optional_match_nodes(hash)
|
215
|
+
match_nodes(hash, true)
|
216
|
+
end
|
217
|
+
|
213
218
|
include Enumerable
|
214
219
|
|
215
220
|
def count(var = nil)
|
data/lib/neo4j-core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Ronge, Chris Grigg, Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|