Commit 3fddc97d authored by zhengfunan's avatar zhengfunan

添加清库方法

parent 78c14622
......@@ -98,7 +98,7 @@
<workItem from="1693447950473" duration="11267000" />
<workItem from="1693536669710" duration="10048000" />
<workItem from="1693622693690" duration="19250000" />
<workItem from="1693802539121" duration="2088000" />
<workItem from="1693802539121" duration="3377000" />
</task>
<task id="LOCAL-00001" summary="stater版首次提交">
<created>1693387558801</created>
......@@ -135,7 +135,14 @@
<option name="project" value="LOCAL" />
<updated>1693803248860</updated>
</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 />
</component>
<component name="TypeScriptGeneratedFilesManager">
......
......@@ -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();
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment