neo4j-core 4.0.3 → 4.0.4
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/version.rb +1 -1
- data/lib/neo4j-server/cypher_node.rb +6 -1
- data/lib/neo4j-server/cypher_session.rb +7 -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: 377d0ecb66881b1272a0f620a00aec54f1e39cbe
|
4
|
+
data.tar.gz: 16d2716622c955a4409ea043810818ad05d53af1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aee2e52eda16ec48962b66ba8e63951d7293bdf4c89e06f8b7a371837d36baa9cc2b06100a6bc827e508a03b74f34b54a47f6b22378f01db8cab95595dcf321
|
7
|
+
data.tar.gz: 454be77dc626df324aaa61ad272ba9e666062c0ea9c1becc30f4e0307d11898ed708912cb6fd400e89ceef7218d1f7102cc78647836568e5f38e8a29f43a69ce
|
data/lib/neo4j-core/version.rb
CHANGED
@@ -129,7 +129,8 @@ module Neo4j
|
|
129
129
|
|
130
130
|
# (see Neo4j::Node#del)
|
131
131
|
def del
|
132
|
-
|
132
|
+
query = match_start_query.optional_match('n-[r]-()').delete(:n, :r)
|
133
|
+
@session._query_or_fail(query, false)
|
133
134
|
end
|
134
135
|
|
135
136
|
alias_method :delete, :del
|
@@ -216,6 +217,10 @@ module Neo4j
|
|
216
217
|
def match_start(identifier = 'n')
|
217
218
|
"MATCH (#{identifier}) WHERE ID(#{identifier}) = {neo_id}"
|
218
219
|
end
|
220
|
+
|
221
|
+
def match_start_query(identifier = :n)
|
222
|
+
@session.query.match(identifier).where(identifier => {neo_id: neo_id}).with(identifier)
|
223
|
+
end
|
219
224
|
end
|
220
225
|
end
|
221
226
|
end
|
@@ -189,7 +189,13 @@ module Neo4j
|
|
189
189
|
Neo4j::Transaction.current ? r : r['data']
|
190
190
|
end
|
191
191
|
|
192
|
-
def _query_or_fail(q, single_row = false, params =
|
192
|
+
def _query_or_fail(q, single_row = false, params = {})
|
193
|
+
if q.is_a?(::Neo4j::Core::Query)
|
194
|
+
cypher = q.to_cypher
|
195
|
+
params = q.send(:merge_params).merge(params)
|
196
|
+
q = cypher
|
197
|
+
end
|
198
|
+
|
193
199
|
response = _query(q, params)
|
194
200
|
response.raise_error if response.error?
|
195
201
|
single_row ? response.first_data : response
|
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: 4.0.
|
4
|
+
version: 4.0.4
|
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-03-
|
11
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|