#449 Add ShowPartitions example for C++ SDK

pull/451/head
groot 2019-11-21 11:28:28 +08:00
parent 01f9d31d08
commit 7fa7a2a65b
2 changed files with 10 additions and 0 deletions

View File

@ -41,6 +41,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#404 - Add virtual method Init() in Pass abstract class
- \#409 - Add a Fallback pass in optimizer
- \#433 - C++ SDK query result is not easy to use
- \#449 - Add ShowPartitions example for C++ SDK
## Task

View File

@ -93,6 +93,15 @@ ClientTest::Test(const std::string& address, const std::string& port) {
std::cout << "CreatePartition function call status: " << stat.message() << std::endl;
milvus_sdk::Utils::PrintPartitionParam(partition_param);
}
// show partitions
milvus::PartitionList partition_array;
stat = conn->ShowPartitions(TABLE_NAME, partition_array);
std::cout << partition_array.size() << " partitions created:" << std::endl;
for (auto& partition : partition_array) {
std::cout << "\t" << partition.partition_name << "\t tag = " << partition.partition_tag << std::endl;
}
}
{ // insert vectors