跳到主要内容
版本:v2.5.x

drop_database()

This operation drops the specified database.

Request Syntax

Python
drop_database(
db_name: str,
timeout: Optional[float] = None,
**kwargs,
)

PARAMETERS:

  • db_name (string) -

    [REQUIRED]

    Name of the database to drop.

  • timeout (float | None) -

    The timeout duration for this operation. Setting this to None indicates that it timeouts when a response arrives or an error occurs.

RETURN TYPE:

NoneType

RETURNS:

None

EXCEPTIONS:

  • MilvusException - Raised if any error occurs during this operation.

Examples

Python
from pymilvus import MilvusClient

client = MilvusClient(uri, token) # db = "default"

client.drop_database("my_db")