neo4j-core 7.0.0 → 7.0.1
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/lib/neo4j-core/version.rb +1 -1
- data/lib/neo4j/core/cypher_session/adaptors/http.rb +10 -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: 8a8e5f37f8a4737e5f3ced9b4f613f9d08316227
|
|
4
|
+
data.tar.gz: 374a383a2539f26a79d43503b70a0b08ae5d5492
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 358527fc8331056ed618670c3f76f215d344c19e461bf3e130bc40080e146ac36aaad58ca8454b1190250e5ea5d27d7713b6838b1416873256c1fe6da6ee9ad9
|
|
7
|
+
data.tar.gz: 462b56fa7bfee75204acfac66534d465ae4504e7d56ac17ced98a9a6944c5149ae82ec3bdf9ddff086d9731f100cffed598fff7501c0f1c4e6a3d64fd8df235c
|
data/lib/neo4j-core/version.rb
CHANGED
|
@@ -44,6 +44,7 @@ module Neo4j
|
|
|
44
44
|
def indexes(_session)
|
|
45
45
|
response = @requestor.get('db/data/schema/index')
|
|
46
46
|
|
|
47
|
+
check_for_schema_response_error!(response.body)
|
|
47
48
|
list = response.body || []
|
|
48
49
|
|
|
49
50
|
list.map do |item|
|
|
@@ -58,6 +59,7 @@ module Neo4j
|
|
|
58
59
|
def constraints(_session, _label = nil, _options = {})
|
|
59
60
|
response = @requestor.get('db/data/schema/constraint')
|
|
60
61
|
|
|
62
|
+
check_for_schema_response_error!(response.body)
|
|
61
63
|
list = response.body || []
|
|
62
64
|
list.map do |item|
|
|
63
65
|
{type: CONSTRAINT_TYPES[item[:type]],
|
|
@@ -66,6 +68,14 @@ module Neo4j
|
|
|
66
68
|
end
|
|
67
69
|
end
|
|
68
70
|
|
|
71
|
+
def check_for_schema_response_error!(response_body)
|
|
72
|
+
return if !response_body.is_a?(Hash) || !response_body.key?(:errors)
|
|
73
|
+
|
|
74
|
+
message = response_body[:errors].map { |error| "#{error[:code]}: #{error[:message]}" }.join("\n ")
|
|
75
|
+
|
|
76
|
+
fail CypherSession::ConnectionFailedError, "Connection failure: \n #{message}"
|
|
77
|
+
end
|
|
78
|
+
|
|
69
79
|
def self.transaction_class
|
|
70
80
|
require 'neo4j/core/cypher_session/transactions/http'
|
|
71
81
|
Neo4j::Core::CypherSession::Transactions::HTTP
|
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.1
|
|
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: 2016-12-
|
|
11
|
+
date: 2016-12-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|