Skip to content

Commit 364da8b

Browse files
authored
enhance: [2.4]createdatabase support properties (#2450)
enhance createdatabase support properties issue: #2447 --------- Signed-off-by: Xianhui.Lin <[email protected]>
1 parent eb0c882 commit 364da8b

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

pymilvus/client/grpc_handler.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,8 +1354,14 @@ def get_loading_progress(
13541354
return response.progress
13551355

13561356
@retry_on_rpc_failure()
1357-
def create_database(self, db_name: str, timeout: Optional[float] = None, **kwargs):
1358-
request = Prepare.create_database_req(db_name, **kwargs)
1357+
def create_database(
1358+
self,
1359+
db_name: str,
1360+
properties: Optional[dict] = None,
1361+
timeout: Optional[float] = None,
1362+
**kwargs,
1363+
):
1364+
request = Prepare.create_database_req(db_name, properties=properties, **kwargs)
13591365
status = self._stub.CreateDatabase(request, timeout=timeout)
13601366
check_status(status)
13611367

pymilvus/milvus_client/milvus_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,9 +1167,9 @@ def using_database(self, db_name: str, **kwargs):
11671167
conn = self._get_connection()
11681168
conn.reset_db_name(db_name)
11691169

1170-
def create_database(self, db_name: str, **kwargs):
1170+
def create_database(self, db_name: str, properties: Optional[dict] = None, **kwargs):
11711171
conn = self._get_connection()
1172-
conn.create_database(db_name, **kwargs)
1172+
conn.create_database(db_name, properties, **kwargs)
11731173

11741174
def drop_database(self, db_name: str, **kwargs):
11751175
conn = self._get_connection()

0 commit comments

Comments
 (0)