Skip to content

Commit 0a76103

Browse files
committed
Bytes
1 parent b7e0e3a commit 0a76103

File tree

8 files changed

+1827
-1605
lines changed

8 files changed

+1827
-1605
lines changed

neo4j/bolt/connection.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ def supports_statement_reuse(self):
111111
return False
112112
return self.version_info() >= (3, 2)
113113

114+
def supports_bytes(self):
115+
if not self.version:
116+
return False
117+
if self.product() != "Neo4j":
118+
return False
119+
return self.version_info() >= (3, 2)
120+
114121

115122
class Connection(object):
116123
""" Server connection for Bolt protocol v1.
@@ -177,6 +184,7 @@ def __init__(self, sock, **config):
177184
self.sync()
178185

179186
self._supports_statement_reuse = self.server.supports_statement_reuse()
187+
self.packer.supports_bytes = self.server.supports_bytes()
180188

181189
def __del__(self):
182190
self.close()

neo4j/bolt/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,4 @@ def view(self):
254254
if chunk_size == 0:
255255
return memoryview(self._data[:self._header])
256256
else:
257-
return memoryview(self._data[:end])
257+
return memoryview(self._data[:end])

0 commit comments

Comments
 (0)