CapyDB provides a method to completely remove a collection including all of its documents, indexes, and metadata. This operation is permanent and cannot be undone.
The drop
operation deletes the entire collection. Use this with caution as it will permanently remove all data in the collection.
drop
Here's how you can drop a collection using Python:
from capydb import CapyDB
from dotenv import load_dotenv
load_dotenv()
capydb = CapyDB()
db = capydb.db("your_db_name")
collection = db.collection("your_collection_name")
# Drop the entire collection
collection.drop()
drop
Here's how you can drop a collection using TypeScript:
The drop
method doesn't return any meaningful content on success (HTTP 204 No Content response). If there is an error, appropriate exceptions will be thrown.
drop
operation is permanent and cannot be undoneYour feedback helps us improve our documentation. Let us know what you think!