Comments (3)
Hello @sha-eln!
Sorry for the delay in responding to your issue, we truly appreciate your patience. Our team has been heavily occupied with other tasks.
In ArangoDB, creating and deleting collections are operations that can't be done inside a transaction. Transactions are designed to provide atomicity and isolation to data manipulation operations (like insert, update, delete) on existing collections, rather than structural changes to the database itself (like creating or deleting collections).
If you need to empty a collection (i.e., delete all documents but keep the collection itself), you should be able to do that using a truncate operation:
db = client.db(DB_NAME , username=DB_USER, password=DB_PASSWORD)
collection = db.collection(COLL_NAME)
collection.truncate()
Lastly, while you can truncate a collection inside a transaction, it's important to note that if truncation is all you're doing, a transaction is not necessary. Transactions are typically used to ensure atomicity of multiple interdependent operations.
from python-arango.
Dear @sha-eln,
I believe my answer clears some of the confusion regarding transactions. Therefore, I am going to close this issue. In case you experience any problems with our Python driver, don't hesitate to open a new one.
from python-arango.
@apetenchea Thank you so much for your response! Yes that does clear things up quite a bit. Wishing you all the best. :)
from python-arango.
Related Issues (20)
- Documentation issue: ordered/geoJSON on collection.add_geo_index HOT 1
- Authenticate using User JWT-Token HOT 1
- Custom JSON serializer not being used for bulk operations HOT 3
- Edges not retrievable without committing transaction HOT 2
- python-arango is not working without pip-install installation HOT 3
- Content in API docs of branch `main` disappeared HOT 1
- merge functionality HOT 1
- Replacement for `pkg_resources` HOT 1
- Unable to disable request timeout HOT 2
- Requests with endpoint="/_api/simple/..." fail HOT 10
- API Specification Page is not rendering
- Collection.find does not work in 7.6.1 if filter attribute is set to none HOT 3
- Enum can't be serialized anymore after upgrade to 7.6.2 HOT 2
- bind_vars type hints are incomplete HOT 4
- broken build_filter_conditions for keys with spaces // backtick escaping missing? HOT 2
- Unix socket support HOT 5
- Make ArangoClient generic to support typing when a custom serialiser is used HOT 9
- feature request: Continue an existing transaction HOT 3
- `arango.exceptions.GraphTraverseError: [HTTP 404][ERR 404] unknown path '/_api/traversal'` when using `traverse` (arangodb 3.12) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-arango.