Skip to content

Commit

Permalink
enhance createdatabase support properties
Browse files Browse the repository at this point in the history
Signed-off-by: Xianhui.Lin <[email protected]>
  • Loading branch information
JsDove committed Dec 13, 2024
1 parent be184b5 commit d3bdfd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1359,8 +1359,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)

Expand Down
4 changes: 2 additions & 2 deletions pymilvus/milvus_client/milvus_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d3bdfd3

Please sign in to comment.