neo4j-core 5.1.5 → 5.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/neo4j-core/version.rb +1 -1
- data/lib/neo4j-server/cypher_response.rb +25 -10
- 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: 7cf22ec9b38a45fc2f98e1c0f2a1c6590187233c
|
4
|
+
data.tar.gz: e5728703afe4dd48465091dcbbf1f5529e67fa59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0f071af7269ad71c46a095bb1a77ff43bc707ceb36af82c61e40ca23c332b1eee23910fbba74ee2f2050bfd5f1827981b26e9202d708c9dd536c8abf44707c
|
7
|
+
data.tar.gz: 3dbb4b3c9113a35a719cff75f1236e9be03a397c52f1041a74a2d3ad9672ff0d7426c62c07425fe38511cf9a6788fcb7474b813fc6983e28748fd61539d92ae5
|
data/lib/neo4j-core/version.rb
CHANGED
@@ -86,20 +86,34 @@ module Neo4j
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def hash_value_as_object(value, session)
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
89
|
+
if transaction_response?
|
90
|
+
add_transaction_entity_id
|
91
|
+
data = mapped_rest_data
|
92
|
+
elsif [:node, :relationship].include?(identify_entity(value))
|
93
|
+
add_entity_id(value)
|
94
|
+
data = value
|
95
|
+
else
|
96
|
+
return value
|
97
|
+
end
|
98
|
+
|
99
99
|
basic_obj = (node?(value) ? CypherNode : CypherRelationship).new(session, data)
|
100
100
|
unwrapped? ? basic_obj : basic_obj.wrapper
|
101
101
|
end
|
102
102
|
|
103
|
+
def identify_entity(data)
|
104
|
+
self_string = data[:self]
|
105
|
+
if self_string
|
106
|
+
type = self_string.split('/')[-2]
|
107
|
+
if type == 'node'
|
108
|
+
:node
|
109
|
+
elsif type == 'relationship'
|
110
|
+
:relationship
|
111
|
+
end
|
112
|
+
elsif [:nodes, :relationships, :start, :end, :length].all? { |k| data.key?(k) }
|
113
|
+
:path
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
103
117
|
def looks_like_an_object?(value)
|
104
118
|
if transaction_response?
|
105
119
|
mapped_rest_data[:outgoing_relationships] || (mapped_rest_data[:start] && mapped_rest_data[:properties])
|
@@ -272,3 +286,4 @@ module Neo4j
|
|
272
286
|
end
|
273
287
|
end
|
274
288
|
end
|
289
|
+
|
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: 5.1.
|
4
|
+
version: 5.1.6
|
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: 2015-09-
|
11
|
+
date: 2015-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|