Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: [2.4]createdatabase support properties #2450

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1354,8 +1354,14 @@ 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
Loading