neo4j-ruby-driver 1.7.2 → 1.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ffi/neo4j/driver/internal/async/direct_connection.rb +2 -2
- data/ffi/neo4j/driver/internal/driver_factory.rb +2 -1
- data/ffi/neo4j/driver/internal/handlers/pull_all_response_handler.rb +1 -1
- data/ffi/neo4j/driver/internal/value/value_adapter.rb +5 -3
- data/lib/neo4j/driver/internal/duration_normalizer.rb +2 -1
- data/lib/neo4j/driver/version.rb +1 -1
- data/lib/neo4j_ruby_driver.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4299bc356ee0c406d130ff94440c61122a00061efd90cc66335b710700e7247e
|
4
|
+
data.tar.gz: 1060ce101c95bac9e471c51ca04f0267efbd720826e5a301f9183bb2cce26194
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d18e0ef3c134175493f9fa555a30114dde1d4a768fe33fecfd6fc559560b965c600457f509a3ad40182598c66c5b5c93438449209e0fd5a2f7599ac52daa2bd
|
7
|
+
data.tar.gz: e1ef7028d0c38b7e31e5201bf0fbca8d4d69329fd8eff78e5e6dea3bb6ed6fadfcced4dccbb46895c0f6511800c398f1756ae55e0dc4bcca2bbb6eeff70b2c17
|
@@ -22,11 +22,11 @@ module Neo4j
|
|
22
22
|
|
23
23
|
def write_and_flush(statement, parameters, boomarks_holder, config, run_handler, pull_handler)
|
24
24
|
check_error Bolt::Connection.clear_run(bolt_connection)
|
25
|
-
check_error Bolt::Connection.set_run_cypher(bolt_connection, statement, statement.
|
25
|
+
check_error Bolt::Connection.set_run_cypher(bolt_connection, statement, statement.bytesize, parameters.size)
|
26
26
|
parameters.each_with_index do |(name, object), index|
|
27
27
|
name = name.to_s
|
28
28
|
Value::ValueAdapter.to_neo(
|
29
|
-
Bolt::Connection.set_run_cypher_parameter(bolt_connection, index, name, name.
|
29
|
+
Bolt::Connection.set_run_cypher_parameter(bolt_connection, index, name, name.bytesize), object
|
30
30
|
)
|
31
31
|
end
|
32
32
|
set_bookmarks(:set_run_bookmarks, boomarks_holder.bookmarks)
|
@@ -23,7 +23,8 @@ module Neo4j
|
|
23
23
|
def create_connector(uri, auth_token, routing_context, config)
|
24
24
|
address = Bolt::Address.create(host(uri).gsub(/^\[(.*)\]$/, '\\1'), port(uri).to_s)
|
25
25
|
bolt_config = bolt_config(config)
|
26
|
-
logger
|
26
|
+
# callbacks from C to ruby used in logger may cause deadlocks on MRI
|
27
|
+
logger = InternalLogger.register(bolt_config, config[:logger]) if RUBY_PLATFORM.match?(/java/)
|
27
28
|
set_socket_options(bolt_config, config)
|
28
29
|
set_routing_context(bolt_config, routing_context)
|
29
30
|
set_scheme(bolt_config, uri, routing_context)
|
@@ -50,6 +50,8 @@ module Neo4j
|
|
50
50
|
when String
|
51
51
|
object = object.encode(Encoding::UTF_8) unless object.encoding == Encoding::UTF_8
|
52
52
|
Bolt::Value.format_as_string(value, object, object.bytesize)
|
53
|
+
when Symbol
|
54
|
+
to_neo(value, object.to_s)
|
53
55
|
when Hash
|
54
56
|
Bolt::Value.format_as_dictionary(value, object.size)
|
55
57
|
object.each_with_index do |(key, elem), index|
|
@@ -63,8 +65,6 @@ module Neo4j
|
|
63
65
|
object = object.to_a
|
64
66
|
Bolt::Value.format_as_list(value, object.size)
|
65
67
|
object.each_with_index { |elem, index| to_neo(Bolt::List.value(value, index), elem) }
|
66
|
-
when Date
|
67
|
-
DateValue.to_neo(value, object)
|
68
68
|
when ActiveSupport::Duration
|
69
69
|
DurationValue.to_neo(value, object)
|
70
70
|
when Neo4j::Driver::Types::Point
|
@@ -84,8 +84,10 @@ module Neo4j
|
|
84
84
|
LocalDateTimeValue.to_neo(value, object)
|
85
85
|
when ActiveSupport::TimeWithZone
|
86
86
|
TimeWithZoneIdValue.to_neo(value, object)
|
87
|
-
when Time
|
87
|
+
when Time, DateTime
|
88
88
|
TimeWithZoneOffsetValue.to_neo(value, object)
|
89
|
+
when Date
|
90
|
+
DateValue.to_neo(value, object)
|
89
91
|
else
|
90
92
|
Exceptions::ClientException.unable_to_convert(object)
|
91
93
|
end
|
@@ -6,7 +6,8 @@ module Neo4j
|
|
6
6
|
module DurationNormalizer
|
7
7
|
class << self
|
8
8
|
def normalize(object)
|
9
|
-
parts = object.parts
|
9
|
+
parts = object.parts.to_h
|
10
|
+
parts.default = 0
|
10
11
|
months_i, months_remainder_seconds = divmod(months(parts), ActiveSupport::Duration::SECONDS_PER_MONTH)
|
11
12
|
months_days, months_remainder_seconds =
|
12
13
|
months_remainder_seconds.divmod(ActiveSupport::Duration::SECONDS_PER_DAY)
|
data/lib/neo4j/driver/version.rb
CHANGED
data/lib/neo4j_ruby_driver.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-ruby-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Heinrich Klobuczek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -337,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
337
337
|
- !ruby/object:Gem::Version
|
338
338
|
version: '0'
|
339
339
|
requirements: []
|
340
|
-
rubygems_version: 3.
|
340
|
+
rubygems_version: 3.3.3
|
341
341
|
signing_key:
|
342
342
|
specification_version: 4
|
343
343
|
summary: ''
|