delete_collection - Delete a Collection
The delete_collection() method is used to delete a specified Collection.
info
This API is only available when you are connected to the database using a client. For more information about the client, see Client.
Prerequisites
-
You have installed pyseekdb. For more information about how to install pyseekdb, see Get Started.
-
You are connected to the database. For more information about how to connect to the database, see Client.
-
The Collection you want to delete exists. If the Collection does not exist, an error will be returned.
Request parameters
client.delete_collection(name)
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
name | string | Yes | The name of the Collection to be deleted. | my_collection |
Request example
import pyseekdb
# Create a client
client = pyseekdb.Client()
# Delete a collection
client.delete_collection("my_collection")
Response parameters
None