开发者

HyperGraphDB: How to clear/truncate the whole database?

开发者 https://www.devze.com 2023-03-25 12:15 出处:网络
is there a fast way to truncate/clear the graph? I know I could delete the database directory or select all and traverse and delete them, but I\'m look开发者_如何学Pythoning for a more elegant way.

is there a fast way to truncate/clear the graph?

I know I could delete the database directory or select all and traverse and delete them, but I'm look开发者_如何学Pythoning for a more elegant way.

Best regards


Deleting the database directory is really the way to do it. It actually doesn't make much sense to have it any other way because even the indices that you might have created are recorded as graph atoms so there's no really any information you would preserve by truncating all the different files that comprise a HyperGraphDB instance. And probably it won't be any faster anyway. There's a method in HGUtils to delete the directory, which is what we normally use.

Best, Boris

0

精彩评论

暂无评论...
验证码 换一张
取 消