Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neo4jRelation
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qiuchaofei
neo4jRelation
Commits
b6e81866
Commit
b6e81866
authored
May 31, 2022
by
qiuchaofei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.获取关系类型
parent
09618782
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
BaseRelationshipServiceImpl.java
...ataRelation/service/impl/BaseRelationshipServiceImpl.java
+1
-8
No files found.
src/main/java/com/keymobile/metadata/metadataRelation/service/impl/BaseRelationshipServiceImpl.java
View file @
b6e81866
...
...
@@ -81,14 +81,12 @@ public class BaseRelationshipServiceImpl implements IBaseRelationshipService {
List
<
String
>
relationTypes
=
new
ArrayList
<>();
String
cypher
=
" MATCH (
n)-[r]->() RETURN id(STARTNODE(r)) as startId,id(endNode(r)) as endId, type(r) as name
"
;
String
cypher
=
" MATCH (
)-[r]->() RETURN distinct type(r) as name
"
;
logger
.
info
(
"cypher:"
+
cypher
);
StatementResult
result
=
session
.
run
(
cypher
);
while
(
result
.
hasNext
())
{
Record
record
=
(
Record
)
result
.
next
();
Long
startId
=
record
.
get
(
"startId"
).
asLong
();
Long
endId
=
record
.
get
(
"endId"
).
asLong
();
String
name
=
record
.
get
(
"name"
).
asString
();
if
(
name
.
equals
(
"Input"
))
{
...
...
@@ -101,11 +99,6 @@ public class BaseRelationshipServiceImpl implements IBaseRelationshipService {
name
=
"执行"
;
}
// if (name == null || name.equals("null")) {
// name = startId + "-" + "relation" + "-" + endId;
// } else {
// name = startId + "-" + name + "-" + endId;
// }
if
(!
relationTypes
.
contains
(
name
))
{
relationTypes
.
add
(
name
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment