Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to remove all content from a graph without dropping collections ( document and edges ) #17860

Open
grimace opened this issue Dec 22, 2022 · 1 comment
Labels
1 Question 3 AQL Query language related 3 Graph Graph query engine

Comments

@grimace
Copy link

grimace commented Dec 22, 2022

My Environment

version 3.10.1
Single Server
Manual Start
Singleton on ubuntu
AWS EC2
Ubuntu 20.04
Total RAM in your machine: N/A
Disks in use: N/A
Ubuntu.deb

I have a graph with document collections and edge collections. I'm populating it from external json objects and am working though issues. Periodically I want to clean the whole db/graph but don't want to drop the collections.

I've built a number of relations in my graph settings and I'm afraid they will get lost if I drop a collection.

Do I have to do a find/remove all for each collection? Is there a way to wildcard remove all?

Do the collections have a wild card remove?

for instance:
REMOVE * from location

@dothebart
Copy link
Contributor

Hi,
you can use the truncate operation on collections, which could be faster than dropping.
Edges point do collection names; if you re-create vertex collections with documents with similar keys, the edges will remain valid.
However, this definitely spoils graph integrity warranties; hence if you don't re-create all referenced vertices you will get dangling edges.
You should use an Outer Join to find dangling edges, and take care of them.

@dothebart dothebart added 3 AQL Query language related 1 Question 3 Graph Graph query engine labels Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Question 3 AQL Query language related 3 Graph Graph query engine
Projects
None yet
Development

No branches or pull requests

2 participants