Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
stater-tdtopo
Project
Project
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
zhengfunan
stater-tdtopo
Commits
3fddc97d
Commit
3fddc97d
authored
Sep 04, 2023
by
zhengfunan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加清库方法
parent
78c14622
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
workspace.xml
.idea/workspace.xml
+9
-2
TDGraphService.java
src/main/java/com/tongda/tdtopo/service/TDGraphService.java
+19
-0
No files found.
.idea/workspace.xml
View file @
3fddc97d
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
<workItem
from=
"1693447950473"
duration=
"11267000"
/>
<workItem
from=
"1693447950473"
duration=
"11267000"
/>
<workItem
from=
"1693536669710"
duration=
"10048000"
/>
<workItem
from=
"1693536669710"
duration=
"10048000"
/>
<workItem
from=
"1693622693690"
duration=
"19250000"
/>
<workItem
from=
"1693622693690"
duration=
"19250000"
/>
<workItem
from=
"1693802539121"
duration=
"
2088
000"
/>
<workItem
from=
"1693802539121"
duration=
"
3377
000"
/>
</task>
</task>
<task
id=
"LOCAL-00001"
summary=
"stater版首次提交"
>
<task
id=
"LOCAL-00001"
summary=
"stater版首次提交"
>
<created>
1693387558801
</created>
<created>
1693387558801
</created>
...
@@ -135,7 +135,14 @@
...
@@ -135,7 +135,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1693803248860
</updated>
<updated>
1693803248860
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"6"
/>
<task
id=
"LOCAL-00006"
summary=
"读取配置文件"
>
<created>
1693809163719
</created>
<option
name=
"number"
value=
"00006"
/>
<option
name=
"presentableId"
value=
"LOCAL-00006"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1693809163719
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"7"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
src/main/java/com/tongda/tdtopo/service/TDGraphService.java
View file @
3fddc97d
...
@@ -1346,4 +1346,23 @@ public class TDGraphService {
...
@@ -1346,4 +1346,23 @@ public class TDGraphService {
}
}
}
}
/**
* 删除所有的节点
* @return
*/
public
void
deleteAllNode
()
{
String
count
=
""
;
try
(
Transaction
transaction
=
graphDb
.
beginTx
()){
String
cypher
=
"MATCH (n) WITH n LIMIT 100000 DETACH DELETE n RETURN count(*)"
;
Result
result
=
graphDb
.
execute
(
cypher
);
count
=
result
.
next
().
get
(
"count(*)"
).
toString
();
// System.out.println("数据清空:"+count);
// System.out.println(!count.equals("0"));
transaction
.
success
();
}
if
(!
count
.
equals
(
"0"
)){
deleteAllNode
();
}
}
}
}
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