英文:
Reseting the Memgraph internal ID
问题
有没有办法删除 Memgraph 中的所有数据并将下一个内部 ID 重置为零?
我注意到每次创建节点时都会自动获得新的 ID。当我删除节点时,该 ID 不会再次使用,而是会使用一个新的 ID。
英文:
is there any way to delete all the data in Memgraph and reset the next internal ID to be created to zero?
I've noticed that every node that is created gets the automatically new ID. When I delete the node that ID is not used again but a new one is used.
答案1
得分: 2
是的,你说得对,这是有意的。您再次获得相同的ID的唯一方式是删除您的数据目录或创建一个新的Memgraph实例。这是因为内部ID(GID)不应该被用户使用,如果他们需要某种操作方式,他们应该使用属性来进行操作。
英文:
Yes, you are right this is intentional. The only way in which you can get same ID again is by deleting your data directory or creating a new Memgraph instance. This is because internal ID(GID) shouldn't be used by users, if they need some way of manipulation, they should use properties for that.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论