mirror of https://github.com/milvus-io/milvus.git
#449 Add ShowPartitions example for C++ SDK
parent
01f9d31d08
commit
7fa7a2a65b
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue