neo4j-core 3.0.0.alpha.5 → 3.0.0.alpha.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-embedded/embedded_relationship.rb +11 -2
- data/lib/neo4j-server/cypher_relationship.rb +4 -4
- data/lib/neo4j/node.rb +7 -1
- data/lib/neo4j/relationship.rb +22 -6
- 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: 0169ab5b121c40e20ed52eef9788cf4f18f46c2a
|
4
|
+
data.tar.gz: 3d193639061208fe216802c04d420faa20b9e0a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1d763665cbe45cfff3765e46d9346e21c379ea0f65930a3405a90632bdd59e8139318fd4a4e15dd3b41795c9d57e87f751ea81dfef365fe7dce3a449bb61d8b
|
7
|
+
data.tar.gz: 85e2bf6b4819f47556b5a33e137bc9980226f75a5c95aa0375e24734f231c1c49af269fcd0962556a1d58100a3b2aa356f91b7384db322a3622701a70ee14e8e
|
data/lib/neo4j-core/version.rb
CHANGED
@@ -19,10 +19,14 @@ module Neo4j::Embedded
|
|
19
19
|
tx_methods :exist?
|
20
20
|
|
21
21
|
def start_node
|
22
|
-
|
22
|
+
_start_node.wrapper
|
23
23
|
end
|
24
24
|
tx_methods :start_node
|
25
25
|
|
26
|
+
def _start_node
|
27
|
+
getStartNode
|
28
|
+
end
|
29
|
+
|
26
30
|
def del
|
27
31
|
delete
|
28
32
|
end
|
@@ -31,12 +35,17 @@ module Neo4j::Embedded
|
|
31
35
|
def other_node(n)
|
32
36
|
_other_node(n.neo4j_obj).wrapper
|
33
37
|
end
|
38
|
+
tx_methods :other_node
|
34
39
|
|
35
40
|
def end_node
|
36
|
-
|
41
|
+
_end_node.wrapper
|
37
42
|
end
|
38
43
|
tx_methods :end_node
|
39
44
|
|
45
|
+
def _end_node
|
46
|
+
getEndNode
|
47
|
+
end
|
48
|
+
|
40
49
|
end
|
41
50
|
end
|
42
51
|
end
|
@@ -29,16 +29,16 @@ module Neo4j::Server
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
32
|
+
def _start_node
|
33
33
|
load_resource
|
34
34
|
id = resource_url_id(resource_url(:start))
|
35
|
-
Neo4j::Node.
|
35
|
+
Neo4j::Node._load(id)
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
38
|
+
def _end_node
|
39
39
|
load_resource
|
40
40
|
id = resource_url_id(resource_url(:end))
|
41
|
-
Neo4j::Node.
|
41
|
+
Neo4j::Node._load(id)
|
42
42
|
end
|
43
43
|
|
44
44
|
def get_property(key)
|
data/lib/neo4j/node.rb
CHANGED
@@ -162,10 +162,16 @@ module Neo4j
|
|
162
162
|
|
163
163
|
# Loads a node from the database with given id
|
164
164
|
def load(neo_id, session = Neo4j::Session.current)
|
165
|
-
node =
|
165
|
+
node = _load(neo_id, session)
|
166
166
|
node && node.wrapper
|
167
167
|
end
|
168
168
|
|
169
|
+
# Same as #load but does not try to return a wrapped node
|
170
|
+
# @return [Neo4j::Node] an unwrapped node
|
171
|
+
def _load(neo_id, session = Neo4j::Session.current)
|
172
|
+
session.load_node(neo_id)
|
173
|
+
end
|
174
|
+
|
169
175
|
# Checks if the given entity node or entity id (Neo4j::Node#neo_id) exists in the database.
|
170
176
|
# @return [true, false] if exist
|
171
177
|
def exist?(entity_or_entity_id, session = Neo4j::Session.current)
|
data/lib/neo4j/relationship.rb
CHANGED
@@ -22,13 +22,27 @@ module Neo4j
|
|
22
22
|
include EntityEquality
|
23
23
|
include Wrapper
|
24
24
|
|
25
|
-
#
|
25
|
+
# Returns the start node of this relationship.
|
26
|
+
# @return [Neo4j::Node,Object] the node or wrapped node
|
26
27
|
def start_node
|
28
|
+
_start_node.wrapper
|
29
|
+
end
|
30
|
+
|
31
|
+
# Same as #start_node but does not wrap the node
|
32
|
+
# @returns [Neo4j::Node]
|
33
|
+
def _start_node
|
27
34
|
raise 'not implemented'
|
28
35
|
end
|
29
36
|
|
30
|
-
#
|
37
|
+
# Returns the end node of this relationship.
|
38
|
+
# @return [Neo4j::Node,Object] the node or wrapped node
|
31
39
|
def end_node
|
40
|
+
_end_node.wrapper
|
41
|
+
end
|
42
|
+
|
43
|
+
# Same as #end_node but does not wrap the node
|
44
|
+
# @returns [Neo4j::Node]
|
45
|
+
def _end_node
|
32
46
|
raise 'not implemented'
|
33
47
|
end
|
34
48
|
|
@@ -79,10 +93,12 @@ module Neo4j
|
|
79
93
|
|
80
94
|
# Same as #other_node but can return a none wrapped node
|
81
95
|
def _other_node(node)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
return
|
96
|
+
s = _start_node
|
97
|
+
e = _end_node
|
98
|
+
if node == _start_node
|
99
|
+
return _end_node
|
100
|
+
elsif node == _end_node
|
101
|
+
return _start_node
|
86
102
|
else
|
87
103
|
raise "Node #{node.inspect} is neither start nor end node"
|
88
104
|
end
|
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: 3.0.0.alpha.
|
4
|
+
version: 3.0.0.alpha.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Ronge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|