From 960145c98de40f01db135f8c682733ebcda4e202 Mon Sep 17 00:00:00 2001 From: SimFG <1142838399@qq.com> Date: Mon, 25 Nov 2024 15:18:33 +0800 Subject: [PATCH] support the properties param in the create database api Signed-off-by: SimFG <1142838399@qq.com> --- milvus/grpc/Database.ts | 5 ++++- milvus/types/Database.ts | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/milvus/grpc/Database.ts b/milvus/grpc/Database.ts index 11a23557..f9faea22 100644 --- a/milvus/grpc/Database.ts +++ b/milvus/grpc/Database.ts @@ -40,7 +40,10 @@ export class Database extends BaseClient { const promise = await promisify( this.channelPool, 'CreateDatabase', - data, + { + db_name: data.db_name, + properties: parseToKeyValue(data.properties), + }, data.timeout || this.timeout ); return promise; diff --git a/milvus/types/Database.ts b/milvus/types/Database.ts index 87753eb9..87cd333b 100644 --- a/milvus/types/Database.ts +++ b/milvus/types/Database.ts @@ -7,7 +7,9 @@ export interface databaseReq extends GrpcTimeOut { } // request -export interface CreateDatabaseRequest extends databaseReq {} +export interface CreateDatabaseRequest extends databaseReq { + properties?: Properties; // optional, properties +} export interface DropDatabasesRequest extends databaseReq {} export interface DescribeDatabaseRequest extends databaseReq {}