From 87460665e075f11bcd657943c8ed13d68b5ef0fd Mon Sep 17 00:00:00 2001 From: nameczz Date: Tue, 14 Sep 2021 09:53:21 +0800 Subject: [PATCH] improve HasCollectionRequest and DropCollectionRequest comments (#7693) Signed-off-by: Gitea --- internal/proto/milvus.proto | 21 +++++++++++++--- internal/proto/milvuspb/milvus.pb.go | 37 ++++++++++++++++++---------- 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/internal/proto/milvus.proto b/internal/proto/milvus.proto index 2cc4a16605..e46c2441c2 100644 --- a/internal/proto/milvus.proto +++ b/internal/proto/milvus.proto @@ -65,16 +65,29 @@ message CreateCollectionRequest { int32 shards_num = 5; } +/** +* Drop collection in milvus, also will drop data in collection. +*/ message DropCollectionRequest { - common.MsgBase base = 1; // must + // Not useful for now + common.MsgBase base = 1; + // Not useful for now string db_name = 2; - string collection_name = 3; // must + // The unique collection name in milvus.(Required) + string collection_name = 3; } +/** +* Check collection exist in milvus or not. +*/ message HasCollectionRequest { - common.MsgBase base = 1; // must + // Not useful for now + common.MsgBase base = 1; + // Not useful for now string db_name = 2; - string collection_name = 3; // must + // The collection name you want to check. + string collection_name = 3; + // Not useful for now uint64 time_stamp = 4; } diff --git a/internal/proto/milvuspb/milvus.pb.go b/internal/proto/milvuspb/milvus.pb.go index 421a754980..04e83ea58e 100644 --- a/internal/proto/milvuspb/milvus.pb.go +++ b/internal/proto/milvuspb/milvus.pb.go @@ -157,13 +157,18 @@ func (m *CreateCollectionRequest) GetShardsNum() int32 { return 0 } +//* +// Drop collection in milvus, also will drop data in collection. type DropCollectionRequest struct { - Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` - CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Not useful for now + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + // Not useful for now + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + // The unique collection name in milvus.(Required) + CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DropCollectionRequest) Reset() { *m = DropCollectionRequest{} } @@ -212,14 +217,20 @@ func (m *DropCollectionRequest) GetCollectionName() string { return "" } +//* +// Check collection exist in milvus or not. type HasCollectionRequest struct { - Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` - CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` - TimeStamp uint64 `protobuf:"varint,4,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Not useful for now + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + // Not useful for now + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + // The collection name you want to check. + CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` + // Not useful for now + TimeStamp uint64 `protobuf:"varint,4,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HasCollectionRequest) Reset() { *m = HasCollectionRequest{} }