GetPartitionStats()
Returns server-reported statistics for a partition, including its row count.
pub async fn get_partition_stats(
&self,
request: GetPartitionStatsRequest,
) -> Result<GetPartitionStatsResponse>
Request Syntax
let request = GetPartitionStatsRequest::builder()
.collection_name("quick_setup")
.partition_name("partitionA")
.build()?;
REQUEST FIELDS:
database_name: Option<String>Name of the target database; uses the default database when empty.
collection_name: StringName of the collection. Required.
partition_name: StringName of the partition. Required.
RETURN TYPE:
Result
RETURNS:
A GetPartitionStatsResponse containing the partition statistics. Returns an Error if the operation fails.
GetPartitionStatsResponse
statistics() // -> &HashMap<String, String>
METHODS:
statistics()(&HashMap) - The full key-value statistics map, including the server-reported row count when present.
Example
let request = GetPartitionStatsRequest::builder()
.collection_name("quick_setup")
.partition_name("partitionA")
.build()?;
let resp = client.get_partition_stats(request).await?;
println!("row_count: {:?}", resp.statistics().get("row_count"));