improve HasCollectionRequest and DropCollectionRequest comments (#7693)

Signed-off-by: Gitea <zizhao.chen@zilliz.com>
This commit is contained in:
nameczz 2021-09-14 09:53:21 +08:00 committed by GitHub
parent c33416f46a
commit 87460665e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 17 deletions

View File

@ -65,16 +65,29 @@ message CreateCollectionRequest {
int32 shards_num = 5; int32 shards_num = 5;
} }
/**
* Drop collection in milvus, also will drop data in collection.
*/
message DropCollectionRequest { message DropCollectionRequest {
common.MsgBase base = 1; // must // Not useful for now
common.MsgBase base = 1;
// Not useful for now
string db_name = 2; 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 { message HasCollectionRequest {
common.MsgBase base = 1; // must // Not useful for now
common.MsgBase base = 1;
// Not useful for now
string db_name = 2; 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; uint64 time_stamp = 4;
} }

View File

@ -157,13 +157,18 @@ func (m *CreateCollectionRequest) GetShardsNum() int32 {
return 0 return 0
} }
//*
// Drop collection in milvus, also will drop data in collection.
type DropCollectionRequest struct { type DropCollectionRequest struct {
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"` Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` // Not useful for now
XXX_NoUnkeyedLiteral struct{} `json:"-"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
XXX_unrecognized []byte `json:"-"` // The unique collection name in milvus.(Required)
XXX_sizecache int32 `json:"-"` 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{} } func (m *DropCollectionRequest) Reset() { *m = DropCollectionRequest{} }
@ -212,14 +217,20 @@ func (m *DropCollectionRequest) GetCollectionName() string {
return "" return ""
} }
//*
// Check collection exist in milvus or not.
type HasCollectionRequest struct { type HasCollectionRequest struct {
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"` Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
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"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` // The collection name you want to check.
XXX_unrecognized []byte `json:"-"` CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
XXX_sizecache int32 `json:"-"` // 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{} } func (m *HasCollectionRequest) Reset() { *m = HasCollectionRequest{} }