neo4j-core 7.0.3 → 7.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/neo4j-core/version.rb +1 -1
- data/lib/neo4j/core/cypher_session/adaptors/bolt.rb +8 -7
- data/lib/neo4j/core/cypher_session/transactions.rb +13 -0
- 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: ce16b1d922c7d961d01877373300831a960938ef
|
4
|
+
data.tar.gz: 9189e6af8a309ea814a3ace27f64110162e3120d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0ff88e22aa50cbdb312ebe7e8daed01c0cd97a685156d4d6bdacb3e0f506aae6bba5de15ab477b20b85c996e06cdad03ac02362df4f44be4dd12ea5866a65b3
|
7
|
+
data.tar.gz: 1e713b042d10673c1ec1b47864aa2ec7c6f1f6763eba8e1bd2438a05341bfcb2ef865f750a18c8b14d2ba074bfed69be1cf5884011744d1c61e0e15bc485aa07
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Neo4j-core [](https://codeclimate.com/github/neo4jrb/neo4j-core) [](https://travis-ci.org/neo4jrb/neo4j-core) [](https://coveralls.io/r/neo4jrb/neo4j-core?branch=master) [](https://www.pullreview.com/github/neo4jrb/neo4j-core/reviews/master)
|
2
2
|
|
3
3
|
A simple Ruby wrapper around the Neo4j graph database that works with the server and embedded Neo4j API. This gem can be used both from JRuby and normal MRI.
|
4
4
|
It can be used standalone without the neo4j gem.
|
@@ -33,7 +33,7 @@ Or via the `Neo4j::Core::Query` class
|
|
33
33
|
|
34
34
|
neo4j_session.query(query_obj)
|
35
35
|
|
36
|
-
Making multiple queries with one request is
|
36
|
+
Making multiple queries with one request is supported with the HTTP Adaptor:
|
37
37
|
|
38
38
|
results = neo4j_session.queries do
|
39
39
|
append 'MATCH (n:Foo) RETURN n LIMIT 10'
|
data/lib/neo4j-core/version.rb
CHANGED
@@ -201,7 +201,7 @@ module Neo4j
|
|
201
201
|
Message.new(structure.signature, *structure.list).tap do |message|
|
202
202
|
log_message :S, message.type, message.args.join(' ')
|
203
203
|
end
|
204
|
-
end
|
204
|
+
end
|
205
205
|
end
|
206
206
|
end
|
207
207
|
|
@@ -216,15 +216,16 @@ module Neo4j
|
|
216
216
|
|
217
217
|
# Replace with Enumerator?
|
218
218
|
def flush_response
|
219
|
-
|
220
|
-
log_message :S, :chunk_size, chunk_size
|
221
|
-
|
222
|
-
chunk = recvmsg(chunk_size)
|
219
|
+
chunk = ''
|
223
220
|
|
224
|
-
|
221
|
+
while !(header = recvmsg(2)).empty? && (chunk_size = header.unpack('s>*')[0]) > 0
|
222
|
+
log_message :S, :chunk_size, chunk_size
|
225
223
|
|
226
|
-
|
224
|
+
chunk << recvmsg(chunk_size)
|
227
225
|
end
|
226
|
+
|
227
|
+
unpacker = PackStream::Unpacker.new(StringIO.new(chunk))
|
228
|
+
[].tap { |r| while arg = unpacker.unpack_value!; r << arg; end }
|
228
229
|
end
|
229
230
|
|
230
231
|
# Represents messages sent to or received from the server
|
@@ -19,6 +19,19 @@ module Neo4j
|
|
19
19
|
adaptor.queries(@session, {transaction: self}.merge(options), &block)
|
20
20
|
end
|
21
21
|
|
22
|
+
def after_commit_registry
|
23
|
+
@after_commit_registry ||= []
|
24
|
+
end
|
25
|
+
|
26
|
+
def after_commit(&block)
|
27
|
+
after_commit_registry << block
|
28
|
+
end
|
29
|
+
|
30
|
+
def post_close!
|
31
|
+
super
|
32
|
+
after_commit_registry.each(&:call) unless failed?
|
33
|
+
end
|
34
|
+
|
22
35
|
private
|
23
36
|
|
24
37
|
# Because we're inheriting from the old Transaction class
|
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: 7.0.
|
4
|
+
version: 7.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: 2017-
|
11
|
+
date: 2017-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|