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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb1c2e88da0bcf522a38391e45af4b9c67a48c2f
4
- data.tar.gz: b9cdb19be15670a567413623d4cc65912885ec17
3
+ metadata.gz: b087bb25ea1d82b5bbbd56620873a59c407db327
4
+ data.tar.gz: 63240c5469031bc1a91addbab8aeac72b08b4458
5
5
  SHA512:
6
- metadata.gz: 957878bf744e5c4876c8bf978803bd547f1102c0232cb0f4a7ccce65165bb8808b96c5e440eccdea28be32f238dea15d732893d84dda3578fac23d027bde0301
7
- data.tar.gz: 5c69bf4a5b696e9d4fa87bf0f1e94918b688aa7ffefeade4ff9540c79037f054491fb6f98542e47d099e840578fcc21b1da4d7aaf4049f27b55bc2bf0d9820db
6
+ metadata.gz: 3d0ff6259008bd2e649513cc51a7a245d078f63948f47021a62c76547db94dac243828d20a6be5fb60c8aef168b0418c07b1d0d72d5347607a2b24a2e1a1ef1e
7
+ data.tar.gz: 67775721f5d9b6312d4e55e65a0d8329506a6ec62f6cbb70c8833e09317f303efdebdc52618efcaa9ee317b938d9c47cab6bf0aef6eab03572385d0215fde547
@@ -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
- query.match(variable).where(variable => {neo_id: neo_id})
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)
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = '5.1.2'
3
+ VERSION = '5.1.3'
4
4
  end
5
5
  end
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.2
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-08-30 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty