AliasDesc
This class represents the metadata of a collection alias. It is returned by calling Desc() on a DescribeAliasResponse object.
AliasDesc();
AliasDesc(std::string alias_name, std::string db_name, std::string collection_name);
METHODS:
const std::string& Name() constName of the alias.
const std::string& DatabaseName() constName of the database the alias belongs to.
const std::string& CollectionName() constName of the collection this alias points to.
Example
#include <milvus/MilvusClientV2.h>
using namespace milvus;
auto client = MilvusClientV2::Create();
client->Connect(ConnectParam("http://localhost:19530").WithToken("root:Milvus"));
DescribeAliasResponse response;
auto status = client->DescribeAlias(
DescribeAliasRequest()
.WithAlias("my_alias"),
response);
if (!status.IsOk()) {
std::cout << status.Message() << std::endl;
}
const AliasDesc& desc = response.Desc();
std::cout << "Alias: " << desc.Name() << "\n"
<< "Collection: " << desc.CollectionName() << "\n"
<< "Database: " << desc.DatabaseName() << "\n";