neo4j-java-driver 0.3.1-java → 1.7.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -9
- data/jruby/neo4j/driver.rb +7 -3
- data/jruby/neo4j/driver/ext/config_converter.rb +43 -0
- data/jruby/neo4j/driver/ext/explicit_transaction.rb +16 -0
- data/jruby/neo4j/driver/ext/graph_database.rb +5 -30
- data/jruby/neo4j/driver/ext/{map_accessor.rb → internal_entity.rb} +8 -4
- data/jruby/neo4j/driver/ext/internal_keys.rb +15 -0
- data/jruby/neo4j/driver/ext/internal_record.rb +10 -2
- data/jruby/neo4j/driver/ext/internal_statement_result.rb +2 -1
- data/jruby/neo4j/driver/ext/map_converter.rb +14 -0
- data/jruby/neo4j/driver/ext/neo_converter.rb +57 -0
- data/jruby/neo4j/driver/ext/network_session.rb +40 -0
- data/jruby/neo4j/driver/ext/ruby_converter.rb +4 -2
- data/jruby/neo4j/driver/ext/run_override.rb +4 -67
- data/lib/neo4j/driver/version.rb +1 -1
- metadata +24 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edb528dde0fb79cba06f8c524c1379631debb6946c57dedd3fb3dd6dfb3e2ee9
|
4
|
+
data.tar.gz: 26fc0d2ec9464a45463284b3787bf3d01180f1ae73e81731b1c6d90e83e72444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caacb575552604baceb66514c4168d2c7fd8bbfab7639537afea03d9708cf588ba07d1a70eec8174734965f9f08758d7d1503427c1fad24b4c59a75f514c5cd7
|
7
|
+
data.tar.gz: fae35515bc2d68a4b17032f17f76b53ac43025c83f5fb5fb16820a00fdc0b175ec404b1f782c01c762fefcd626e87a3540f15613e6ad381f8e5cea077d6a42bb
|
data/README.md
CHANGED
@@ -26,8 +26,13 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
### neo4j-ruby-driver
|
28
28
|
|
29
|
-
As a prerequisite
|
30
|
-
|
29
|
+
As a prerequisite seabolt must be installed.
|
30
|
+
|
31
|
+
On macOS
|
32
|
+
|
33
|
+
$ brew install michael-simons/homebrew-seabolt/seabolt
|
34
|
+
|
35
|
+
On other systems please follow the instructions to install [seabolt](https://github.com/neo4j-drivers/seabolt) either from package or source. Make sure the libseabolt17 ends up in a system lib path e.g. /usr/local/lib
|
31
36
|
|
32
37
|
Add this line to your application's Gemfile:
|
33
38
|
|
@@ -56,17 +61,23 @@ This gem includes 2 different implementations: java driver based and another one
|
|
56
61
|
|
57
62
|
For java driver based:
|
58
63
|
|
59
|
-
$ bin/setup
|
64
|
+
$ driver=java bin/setup
|
60
65
|
|
61
|
-
FFI based same as above but with
|
66
|
+
FFI based same as above but with driver variable set:
|
62
67
|
|
63
|
-
$
|
68
|
+
$ bin/setup
|
64
69
|
|
65
|
-
|
70
|
+
## Testing
|
71
|
+
|
72
|
+
To run the tests the following tools need to be installed:
|
73
|
+
|
74
|
+
$ brew install python
|
75
|
+
$ pip3 install --user git+https://github.com/klobuczek/boltkit@1.3#egg=boltkit
|
76
|
+
$ neoctrl-install -e 4.0.2 servers
|
77
|
+
$ neoctrl-configure servers/neo4j-enterprise-4.0.2 dbms.directories.import= dbms.default_listen_address=::
|
78
|
+
$ neoctrl-set-initial-password password servers/neo4j-enterprise-4.0.2
|
79
|
+
$ neoctrl-start servers/neo4j-enterprise-4.0.2
|
66
80
|
|
67
|
-
In order to run test by running `rake spec` you may have to set your own `NEO4J_BOLT_URL` URI or it will
|
68
|
-
fallback to `bolt://localhost:7687`.
|
69
|
-
|
70
81
|
## Contributing
|
71
82
|
|
72
83
|
Suggestions, improvements, bug reports and pull requests are welcome on GitHub at https://github.com/neo4jrb/neo4j-ruby-driver.
|
data/jruby/neo4j/driver.rb
CHANGED
@@ -9,6 +9,10 @@ module Neo4j
|
|
9
9
|
module Driver
|
10
10
|
include_package 'org.neo4j.driver.v1'
|
11
11
|
|
12
|
+
Record = Java::OrgNeo4jDriverInternal::InternalRecord
|
13
|
+
StatementResult = Java::OrgNeo4jDriverInternal::InternalStatementResult
|
14
|
+
Transaction = Java::OrgNeo4jDriverInternal::ExplicitTransaction
|
15
|
+
|
12
16
|
module Net
|
13
17
|
include_package 'org.neo4j.driver.v1.net'
|
14
18
|
end
|
@@ -38,15 +42,15 @@ end
|
|
38
42
|
Loader.load
|
39
43
|
|
40
44
|
Java::OrgNeo4jDriverInternal::InternalDriver.prepend Neo4j::Driver::Ext::InternalDriver
|
41
|
-
Java::OrgNeo4jDriverInternal::InternalEntity.include Neo4j::Driver::Ext::
|
45
|
+
Java::OrgNeo4jDriverInternal::InternalEntity.include Neo4j::Driver::Ext::InternalEntity
|
42
46
|
Java::OrgNeo4jDriverInternal::InternalNode.prepend Neo4j::Driver::Ext::InternalNode
|
43
47
|
Java::OrgNeo4jDriverInternal::InternalPath.include Neo4j::Driver::Ext::StartEndNaming
|
44
48
|
Java::OrgNeo4jDriverInternal::InternalPath::SelfContainedSegment.include Neo4j::Driver::Ext::StartEndNaming
|
45
49
|
Java::OrgNeo4jDriverInternal::InternalRecord.prepend Neo4j::Driver::Ext::InternalRecord
|
46
50
|
Java::OrgNeo4jDriverInternal::InternalRelationship.prepend Neo4j::Driver::Ext::InternalRelationship
|
47
51
|
Java::OrgNeo4jDriverInternal::InternalStatementResult.prepend Neo4j::Driver::Ext::InternalStatementResult
|
48
|
-
Java::OrgNeo4jDriverInternal::ExplicitTransaction.prepend Neo4j::Driver::Ext::
|
49
|
-
Java::OrgNeo4jDriverInternal::NetworkSession.prepend Neo4j::Driver::Ext::
|
52
|
+
Java::OrgNeo4jDriverInternal::ExplicitTransaction.prepend Neo4j::Driver::Ext::ExplicitTransaction
|
53
|
+
Java::OrgNeo4jDriverInternal::NetworkSession.prepend Neo4j::Driver::Ext::NetworkSession
|
50
54
|
Java::OrgNeo4jDriverInternalSummary::InternalResultSummary.prepend Neo4j::Driver::Ext::Internal::Summary::InternalResultSummary
|
51
55
|
Java::OrgNeo4jDriverInternalValue::ValueAdapter.include Neo4j::Driver::Ext::RubyConverter
|
52
56
|
Java::OrgNeo4jDriverV1::AuthTokens.singleton_class.prepend Neo4j::Driver::Ext::AuthTokens
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Neo4j
|
4
|
+
module Driver
|
5
|
+
module Ext
|
6
|
+
module ConfigConverter
|
7
|
+
include NeoConverter
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def to_java_config(builder_class, hash)
|
12
|
+
hash&.reduce(builder_class.builder) { |object, key_value| object.send(*config_method(*key_value)) }&.build
|
13
|
+
end
|
14
|
+
|
15
|
+
def config_method(key, value)
|
16
|
+
method = :"with_#{key}"
|
17
|
+
unit = nil
|
18
|
+
case key.to_s
|
19
|
+
when 'encryption'
|
20
|
+
unless value
|
21
|
+
method = :without_encryption
|
22
|
+
value = nil
|
23
|
+
end
|
24
|
+
when 'timeout'
|
25
|
+
value = java.time.Duration.ofMillis(Driver::Internal::DurationNormalizer.milliseconds(value))
|
26
|
+
when /time(out)?$/
|
27
|
+
value = Driver::Internal::DurationNormalizer.milliseconds(value)
|
28
|
+
unit = java.util.concurrent.TimeUnit::MILLISECONDS
|
29
|
+
when 'logger'
|
30
|
+
method = :with_logging
|
31
|
+
value = Neo4j::Driver::Ext::Logger.new(value)
|
32
|
+
when 'resolver'
|
33
|
+
proc = value
|
34
|
+
value = ->(address) { java.util.HashSet.new(proc.call(address)) }
|
35
|
+
else
|
36
|
+
value = to_neo(value, skip_unknown: true)
|
37
|
+
end
|
38
|
+
[method, value, unit].compact
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Neo4j
|
4
|
+
module Driver
|
5
|
+
module Ext
|
6
|
+
module ExplicitTransaction
|
7
|
+
include ExceptionCheckable
|
8
|
+
include RunOverride
|
9
|
+
|
10
|
+
def run(statement, parameters = {})
|
11
|
+
check { super(to_statement(statement, parameters)) }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -5,6 +5,7 @@ module Neo4j
|
|
5
5
|
module Ext
|
6
6
|
module GraphDatabase
|
7
7
|
extend AutoClosable
|
8
|
+
include ConfigConverter
|
8
9
|
include ExceptionCheckable
|
9
10
|
|
10
11
|
auto_closable :driver, :routing_driver
|
@@ -12,41 +13,15 @@ module Neo4j
|
|
12
13
|
def driver(uri, auth_token = Neo4j::Driver::AuthTokens.none, config = nil)
|
13
14
|
check do
|
14
15
|
java_method(:driver, [java.lang.String, org.neo4j.driver.v1.AuthToken, org.neo4j.driver.v1.Config])
|
15
|
-
.call(uri.to_s, auth_token, to_java_config(config))
|
16
|
+
.call(uri.to_s, auth_token, to_java_config(Neo4j::Driver::Config, config))
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
19
20
|
def routing_driver(routing_uris, auth_token, config)
|
20
|
-
check
|
21
|
-
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def to_java_config(hash)
|
26
|
-
hash&.reduce(Neo4j::Driver::Config.build) { |object, key_value| object.send(*config_method(*key_value)) }
|
27
|
-
&.to_config
|
28
|
-
end
|
29
|
-
|
30
|
-
def config_method(key, value)
|
31
|
-
method = :"with_#{key}"
|
32
|
-
unit = nil
|
33
|
-
case key.to_s
|
34
|
-
when 'encryption'
|
35
|
-
unless value
|
36
|
-
method = :without_encryption
|
37
|
-
value = nil
|
38
|
-
end
|
39
|
-
when /Time(out)?$/i
|
40
|
-
value = Driver::Internal::DurationNormalizer.milliseconds(value)
|
41
|
-
unit = java.util.concurrent.TimeUnit::MILLISECONDS
|
42
|
-
when 'logger'
|
43
|
-
method = :with_logging
|
44
|
-
value = Neo4j::Driver::Ext::Logger.new(value)
|
45
|
-
when 'resolver'
|
46
|
-
proc = value
|
47
|
-
value = ->(address) { java.util.HashSet.new(proc.call(address)) }
|
21
|
+
check do
|
22
|
+
super(routing_uris.map { |uri| java.net.URI.create(uri.to_s) }, auth_token,
|
23
|
+
to_java_config(Neo4j::Driver::Config, config))
|
48
24
|
end
|
49
|
-
[method, value, unit].compact
|
50
25
|
end
|
51
26
|
end
|
52
27
|
end
|
@@ -3,14 +3,18 @@
|
|
3
3
|
module Neo4j
|
4
4
|
module Driver
|
5
5
|
module Ext
|
6
|
-
module
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
module InternalEntity
|
7
|
+
include MapConverter
|
8
|
+
|
9
|
+
alias properties to_h
|
10
10
|
|
11
11
|
def [](key)
|
12
12
|
get(key.to_s).as_ruby_object
|
13
13
|
end
|
14
|
+
|
15
|
+
def ==(other)
|
16
|
+
java_method(:isEqual).call(other)
|
17
|
+
end
|
14
18
|
end
|
15
19
|
end
|
16
20
|
end
|
@@ -4,12 +4,20 @@ module Neo4j
|
|
4
4
|
module Driver
|
5
5
|
module Ext
|
6
6
|
module InternalRecord
|
7
|
+
include MapConverter
|
8
|
+
include InternalKeys
|
9
|
+
|
7
10
|
def values
|
8
11
|
java_send(:values).map(&:as_ruby_object)
|
9
12
|
end
|
10
13
|
|
11
|
-
|
12
|
-
|
14
|
+
def [](key)
|
15
|
+
case key
|
16
|
+
when Integer
|
17
|
+
java_method(:get, [Java::int]).call(key)
|
18
|
+
else
|
19
|
+
java_method(:get, [java.lang.String]).call(key.to_s)
|
20
|
+
end.as_ruby_object
|
13
21
|
end
|
14
22
|
|
15
23
|
def first
|
@@ -6,8 +6,9 @@ module Neo4j
|
|
6
6
|
module InternalStatementResult
|
7
7
|
include Enumerable
|
8
8
|
include ExceptionCheckable
|
9
|
+
include InternalKeys
|
9
10
|
|
10
|
-
%i[has_next? next
|
11
|
+
%i[has_next? next single consume summary peek].each do |method|
|
11
12
|
define_method(method) do |*args, &block|
|
12
13
|
check { super(*args, &block) }
|
13
14
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Neo4j
|
4
|
+
module Driver
|
5
|
+
module Ext
|
6
|
+
module MapConverter
|
7
|
+
def to_h
|
8
|
+
java_method(:asMap, [org.neo4j.driver.v1.util.Function]).call(&:itself).to_hash
|
9
|
+
.transform_values!(&:as_ruby_object).symbolize_keys!
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Neo4j
|
4
|
+
module Driver
|
5
|
+
module Ext
|
6
|
+
module NeoConverter
|
7
|
+
private
|
8
|
+
|
9
|
+
def to_neo(object, skip_unknown: false)
|
10
|
+
case object
|
11
|
+
when Hash
|
12
|
+
object.map { |key, value| [key.to_s, to_neo(value)] }.to_h
|
13
|
+
when Types::Path
|
14
|
+
Exceptions::ClientException.unable_to_convert(object)
|
15
|
+
when Enumerable
|
16
|
+
object.map(&method(:to_neo))
|
17
|
+
when Types::Bytes
|
18
|
+
object.to_java_bytes
|
19
|
+
when Date
|
20
|
+
Java::JavaTime::LocalDate.of(object.year, object.month, object.day)
|
21
|
+
when ActiveSupport::Duration
|
22
|
+
Java::OrgNeo4jDriverInternal::InternalIsoDuration.new(
|
23
|
+
*Driver::Internal::DurationNormalizer.normalize(object)
|
24
|
+
)
|
25
|
+
when Types::Point
|
26
|
+
Java::OrgNeo4jDriverV1::Values.point(object.srid, *object.coordinates)
|
27
|
+
when Types::OffsetTime
|
28
|
+
Java::JavaTime::OffsetTime.of(object.hour, object.min, object.sec,
|
29
|
+
object.nsec, Java::JavaTime::ZoneOffset.of_total_seconds(object.utc_offset))
|
30
|
+
when Types::LocalTime
|
31
|
+
Java::JavaTime::LocalTime.of(object.hour, object.min, object.sec, object.nsec)
|
32
|
+
when Types::LocalDateTime
|
33
|
+
Java::JavaTime::LocalDateTime.of(object.year, object.month, object.day, object.hour, object.min, object.sec,
|
34
|
+
object.nsec)
|
35
|
+
when ActiveSupport::TimeWithZone
|
36
|
+
to_zoned_date_time(object, object.time_zone.tzinfo.identifier)
|
37
|
+
when Time
|
38
|
+
to_zoned_date_time(object, object.formatted_offset)
|
39
|
+
when nil, true, false, Integer, Float, String
|
40
|
+
object
|
41
|
+
else
|
42
|
+
if skip_unknown
|
43
|
+
object
|
44
|
+
else
|
45
|
+
raise Exceptions::ClientException.unable_to_convert(object)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_zoned_date_time(object, zone)
|
51
|
+
Java::JavaTime::ZonedDateTime.of(object.year, object.month, object.day, object.hour, object.min, object.sec,
|
52
|
+
object.nsec, Java::JavaTime::ZoneId.of(zone))
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Neo4j
|
4
|
+
module Driver
|
5
|
+
module Ext
|
6
|
+
module NetworkSession
|
7
|
+
extend AutoClosable
|
8
|
+
include ConfigConverter
|
9
|
+
include ExceptionCheckable
|
10
|
+
include RunOverride
|
11
|
+
|
12
|
+
auto_closable :begin_transaction
|
13
|
+
|
14
|
+
# work around jruby issue https://github.com/jruby/jruby/issues/5603
|
15
|
+
Struct.new('Wrapper', :object)
|
16
|
+
|
17
|
+
%i[read write].each do |prefix|
|
18
|
+
define_method("#{prefix}_transaction") do |**config, &block|
|
19
|
+
check do
|
20
|
+
super(->(tx) { Struct::Wrapper.new(reverse_check { block.call(tx) }) }, to_java_config(Neo4j::Driver::TransactionConfig, config)).object
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# end work around
|
26
|
+
|
27
|
+
def run(statement, parameters = {}, config = {})
|
28
|
+
check do
|
29
|
+
java_method(:run, [org.neo4j.driver.v1.Statement, org.neo4j.driver.v1.TransactionConfig])
|
30
|
+
.call(to_statement(statement, parameters), to_java_config(Neo4j::Driver::TransactionConfig, config))
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def begin_transaction(**config)
|
35
|
+
check { super(to_java_config(Neo4j::Driver::TransactionConfig, config)) }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -4,12 +4,14 @@ module Neo4j
|
|
4
4
|
module Driver
|
5
5
|
module Ext
|
6
6
|
module RubyConverter
|
7
|
+
include MapConverter
|
8
|
+
|
7
9
|
def as_ruby_object
|
8
10
|
case type_constructor
|
9
11
|
when Java::OrgNeo4jDriverInternalTypes::TypeConstructor::LIST
|
10
|
-
|
12
|
+
values(&:itself).map(&:as_ruby_object)
|
11
13
|
when Java::OrgNeo4jDriverInternalTypes::TypeConstructor::MAP
|
12
|
-
|
14
|
+
to_h
|
13
15
|
when Java::OrgNeo4jDriverInternalTypes::TypeConstructor::DATE
|
14
16
|
date = as_local_date
|
15
17
|
Date.new(date.year, date.month_value, date.day_of_month)
|
@@ -4,33 +4,7 @@ module Neo4j
|
|
4
4
|
module Driver
|
5
5
|
module Ext
|
6
6
|
module RunOverride
|
7
|
-
include
|
8
|
-
extend AutoClosable
|
9
|
-
|
10
|
-
auto_closable :begin_transaction
|
11
|
-
|
12
|
-
# work around jruby issue https://github.com/jruby/jruby/issues/5603
|
13
|
-
Struct.new('Wrapper', :object)
|
14
|
-
|
15
|
-
%i[read write].each do |prefix|
|
16
|
-
define_method("#{prefix}_transaction") do |&block|
|
17
|
-
check { super { |tx| Struct::Wrapper.new(reverse_check { block.call(tx) }) }.object }
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
# end work around
|
22
|
-
|
23
|
-
def run(statement, parameters = {})
|
24
|
-
Neo4j::Driver::Internal::Validator.require_hash_parameters!(parameters)
|
25
|
-
check do
|
26
|
-
java_method(:run, [org.neo4j.driver.v1.Statement])
|
27
|
-
.call(Neo4j::Driver::Statement.new(statement, to_neo(parameters) || {}))
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def begin_transaction # (config = nil)
|
32
|
-
check { super }
|
33
|
-
end
|
7
|
+
include NeoConverter
|
34
8
|
|
35
9
|
def close
|
36
10
|
check { super }
|
@@ -38,46 +12,9 @@ module Neo4j
|
|
38
12
|
|
39
13
|
private
|
40
14
|
|
41
|
-
def
|
42
|
-
|
43
|
-
|
44
|
-
object.map { |key, value| [key.to_s, to_neo(value)] }.to_h
|
45
|
-
when Types::Path
|
46
|
-
Exceptions::ClientException.unable_to_convert(object)
|
47
|
-
when Enumerable
|
48
|
-
object.map(&method(:to_neo))
|
49
|
-
when Types::Bytes
|
50
|
-
object.to_java_bytes
|
51
|
-
when Date
|
52
|
-
Java::JavaTime::LocalDate.of(object.year, object.month, object.day)
|
53
|
-
when ActiveSupport::Duration
|
54
|
-
Java::OrgNeo4jDriverInternal::InternalIsoDuration.new(
|
55
|
-
*Driver::Internal::DurationNormalizer.normalize(object)
|
56
|
-
)
|
57
|
-
when Types::Point
|
58
|
-
Java::OrgNeo4jDriverV1::Values.point(object.srid, *object.coordinates)
|
59
|
-
when Types::OffsetTime
|
60
|
-
Java::JavaTime::OffsetTime.of(object.hour, object.min, object.sec,
|
61
|
-
object.nsec, Java::JavaTime::ZoneOffset.of_total_seconds(object.utc_offset))
|
62
|
-
when Types::LocalTime
|
63
|
-
Java::JavaTime::LocalTime.of(object.hour, object.min, object.sec, object.nsec)
|
64
|
-
when Types::LocalDateTime
|
65
|
-
Java::JavaTime::LocalDateTime.of(object.year, object.month, object.day, object.hour, object.min, object.sec,
|
66
|
-
object.nsec)
|
67
|
-
when ActiveSupport::TimeWithZone
|
68
|
-
to_zoned_date_time(object, object.time_zone.tzinfo.identifier)
|
69
|
-
when Time
|
70
|
-
to_zoned_date_time(object, object.formatted_offset)
|
71
|
-
when nil, true, false, Integer, Float, String
|
72
|
-
object
|
73
|
-
else
|
74
|
-
raise Exceptions::ClientException.unable_to_convert(object)
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def to_zoned_date_time(object, zone)
|
79
|
-
Java::JavaTime::ZonedDateTime.of(object.year, object.month, object.day, object.hour, object.min, object.sec,
|
80
|
-
object.nsec, Java::JavaTime::ZoneId.of(zone))
|
15
|
+
def to_statement(text, parameters)
|
16
|
+
Neo4j::Driver::Internal::Validator.require_hash_parameters!(parameters)
|
17
|
+
Neo4j::Driver::Statement.new(text, to_neo(parameters || {}))
|
81
18
|
end
|
82
19
|
end
|
83
20
|
end
|
data/lib/neo4j/driver/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-java-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.7.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Heinrich Klobuczek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -17,8 +17,8 @@ dependencies:
|
|
17
17
|
- !ruby/object:Gem::Version
|
18
18
|
version: '0'
|
19
19
|
name: activesupport
|
20
|
-
prerelease: false
|
21
20
|
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
@@ -31,8 +31,8 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.1.10
|
33
33
|
name: zeitwerk
|
34
|
-
prerelease: false
|
35
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
@@ -45,8 +45,8 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
name: jar-dependencies
|
48
|
-
prerelease: false
|
49
48
|
type: :runtime
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
@@ -59,8 +59,8 @@ dependencies:
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
name: ffaker
|
62
|
-
prerelease: false
|
63
62
|
type: :development
|
63
|
+
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
@@ -73,8 +73,8 @@ dependencies:
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
name: hoe
|
76
|
-
prerelease: false
|
77
76
|
type: :development
|
77
|
+
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
@@ -87,8 +87,8 @@ dependencies:
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
name: hoe-bundler
|
90
|
-
prerelease: false
|
91
90
|
type: :development
|
91
|
+
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
@@ -101,27 +101,13 @@ dependencies:
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
name: hoe-gemspec
|
104
|
-
prerelease: false
|
105
104
|
type: :development
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: 0.3.0
|
117
|
-
name: neo4j-rake_tasks
|
118
105
|
prerelease: false
|
119
|
-
type: :development
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
108
|
- - ">="
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0
|
110
|
+
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
requirement: !ruby/object:Gem::Requirement
|
127
113
|
requirements:
|
@@ -129,8 +115,8 @@ dependencies:
|
|
129
115
|
- !ruby/object:Gem::Version
|
130
116
|
version: '0'
|
131
117
|
name: parallel
|
132
|
-
prerelease: false
|
133
118
|
type: :development
|
119
|
+
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
122
|
- - ">="
|
@@ -143,8 +129,8 @@ dependencies:
|
|
143
129
|
- !ruby/object:Gem::Version
|
144
130
|
version: '0'
|
145
131
|
name: rake
|
146
|
-
prerelease: false
|
147
132
|
type: :development
|
133
|
+
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
136
|
- - ">="
|
@@ -157,8 +143,8 @@ dependencies:
|
|
157
143
|
- !ruby/object:Gem::Version
|
158
144
|
version: '0'
|
159
145
|
name: rspec-its
|
160
|
-
prerelease: false
|
161
146
|
type: :development
|
147
|
+
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
149
|
requirements:
|
164
150
|
- - ">="
|
@@ -171,8 +157,8 @@ dependencies:
|
|
171
157
|
- !ruby/object:Gem::Version
|
172
158
|
version: '0'
|
173
159
|
name: rspec-mocks
|
174
|
-
prerelease: false
|
175
160
|
type: :development
|
161
|
+
prerelease: false
|
176
162
|
version_requirements: !ruby/object:Gem::Requirement
|
177
163
|
requirements:
|
178
164
|
- - ">="
|
@@ -185,8 +171,8 @@ dependencies:
|
|
185
171
|
- !ruby/object:Gem::Version
|
186
172
|
version: '0'
|
187
173
|
name: ruby-maven
|
188
|
-
prerelease: false
|
189
174
|
type: :development
|
175
|
+
prerelease: false
|
190
176
|
version_requirements: !ruby/object:Gem::Requirement
|
191
177
|
requirements:
|
192
178
|
- - ">="
|
@@ -202,8 +188,8 @@ dependencies:
|
|
202
188
|
- !ruby/object:Gem::Version
|
203
189
|
version: '7'
|
204
190
|
name: rdoc
|
205
|
-
prerelease: false
|
206
191
|
type: :development
|
192
|
+
prerelease: false
|
207
193
|
version_requirements: !ruby/object:Gem::Requirement
|
208
194
|
requirements:
|
209
195
|
- - ">="
|
@@ -225,17 +211,23 @@ files:
|
|
225
211
|
- README.md
|
226
212
|
- jruby/neo4j/driver.rb
|
227
213
|
- jruby/neo4j/driver/ext/auth_tokens.rb
|
214
|
+
- jruby/neo4j/driver/ext/config_converter.rb
|
228
215
|
- jruby/neo4j/driver/ext/exception_checkable.rb
|
229
216
|
- jruby/neo4j/driver/ext/exception_mapper.rb
|
217
|
+
- jruby/neo4j/driver/ext/explicit_transaction.rb
|
230
218
|
- jruby/neo4j/driver/ext/graph_database.rb
|
231
219
|
- jruby/neo4j/driver/ext/internal/summary/internal_result_summary.rb
|
232
220
|
- jruby/neo4j/driver/ext/internal_driver.rb
|
221
|
+
- jruby/neo4j/driver/ext/internal_entity.rb
|
222
|
+
- jruby/neo4j/driver/ext/internal_keys.rb
|
233
223
|
- jruby/neo4j/driver/ext/internal_node.rb
|
234
224
|
- jruby/neo4j/driver/ext/internal_record.rb
|
235
225
|
- jruby/neo4j/driver/ext/internal_relationship.rb
|
236
226
|
- jruby/neo4j/driver/ext/internal_statement_result.rb
|
237
227
|
- jruby/neo4j/driver/ext/logger.rb
|
238
|
-
- jruby/neo4j/driver/ext/
|
228
|
+
- jruby/neo4j/driver/ext/map_converter.rb
|
229
|
+
- jruby/neo4j/driver/ext/neo_converter.rb
|
230
|
+
- jruby/neo4j/driver/ext/network_session.rb
|
239
231
|
- jruby/neo4j/driver/ext/ruby_converter.rb
|
240
232
|
- jruby/neo4j/driver/ext/run_override.rb
|
241
233
|
- jruby/neo4j/driver/ext/start_end_naming.rb
|
@@ -281,7 +273,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
281
273
|
requirements:
|
282
274
|
- - ">="
|
283
275
|
- !ruby/object:Gem::Version
|
284
|
-
version: '
|
276
|
+
version: '2.5'
|
285
277
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
286
278
|
requirements:
|
287
279
|
- - ">="
|
@@ -289,8 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
289
281
|
version: '0'
|
290
282
|
requirements:
|
291
283
|
- jar org.neo4j.driver, neo4j-java-driver, 1.7.5
|
292
|
-
|
293
|
-
rubygems_version: 2.7.10
|
284
|
+
rubygems_version: 3.0.6
|
294
285
|
signing_key:
|
295
286
|
specification_version: 4
|
296
287
|
summary: ''
|