From c7e8797cbfc4a0235c9ae9ad3524e3435afb8cec Mon Sep 17 00:00:00 2001 From: "Xianhui.Lin" Date: Fri, 13 Dec 2024 18:01:18 +0800 Subject: [PATCH] enhance createdatabase support properties Signed-off-by: Xianhui.Lin --- pymilvus/client/grpc_handler.py | 4 ++-- pymilvus/milvus_client/milvus_client.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index 1d811a227..3c67cfbb1 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -1354,8 +1354,8 @@ def get_loading_progress( return response.progress @retry_on_rpc_failure() - def create_database(self, db_name: str, timeout: Optional[float] = None, **kwargs): - request = Prepare.create_database_req(db_name, **kwargs) + def create_database(self, db_name: str, properties: Optional[dict] = None, timeout: Optional[float] = None, **kwargs): + request = Prepare.create_database_req(db_name, properties=properties, **kwargs) status = self._stub.CreateDatabase(request, timeout=timeout) check_status(status) diff --git a/pymilvus/milvus_client/milvus_client.py b/pymilvus/milvus_client/milvus_client.py index b0d51d46f..7e2b8f764 100644 --- a/pymilvus/milvus_client/milvus_client.py +++ b/pymilvus/milvus_client/milvus_client.py @@ -1167,9 +1167,9 @@ def using_database(self, db_name: str, **kwargs): conn = self._get_connection() conn.reset_db_name(db_name) - def create_database(self, db_name: str, **kwargs): + def create_database(self, db_name: str, properties: Optional[dict] = None, **kwargs): conn = self._get_connection() - conn.create_database(db_name, **kwargs) + conn.create_database(db_name, properties, **kwargs) def drop_database(self, db_name: str, **kwargs): conn = self._get_connection()