diff --git a/.changepacks/changepack_log_yxfVgyJ9VqE-zDgcpYkNm.json b/.changepacks/changepack_log_yxfVgyJ9VqE-zDgcpYkNm.json new file mode 100644 index 0000000..021f4c0 --- /dev/null +++ b/.changepacks/changepack_log_yxfVgyJ9VqE-zDgcpYkNm.json @@ -0,0 +1 @@ +{"changes":{"crates/vespertide/Cargo.toml":"Patch","crates/vespertide-query/Cargo.toml":"Patch","crates/vespertide-loader/Cargo.toml":"Patch","crates/vespertide-exporter/Cargo.toml":"Patch","crates/vespertide-planner/Cargo.toml":"Patch","crates/vespertide-macro/Cargo.toml":"Patch","crates/vespertide-config/Cargo.toml":"Patch","crates/vespertide-core/Cargo.toml":"Patch","crates/vespertide-naming/Cargo.toml":"Patch","crates/vespertide-cli/Cargo.toml":"Patch"},"note":"Add unique count on status","date":"2025-12-24T05:59:15.536209600Z"} \ No newline at end of file diff --git a/crates/vespertide-cli/src/commands/status.rs b/crates/vespertide-cli/src/commands/status.rs index 0518600..a6fcafd 100644 --- a/crates/vespertide-cli/src/commands/status.rs +++ b/crates/vespertide-cli/src/commands/status.rs @@ -81,14 +81,22 @@ pub fn cmd_status() -> Result<()> { .iter() .filter(|c| matches!(c, vespertide_core::TableConstraint::Index { .. })) .count(); + // Count Unique constraints + let unique_count = model + .constraints + .iter() + .filter(|c| matches!(c, vespertide_core::TableConstraint::Unique { .. })) + .count(); println!( - " {} {} ({} {}, {} {})", + " {} {} ({} {}, {} {}, {} {})", "-".bright_white(), model.name.bright_green(), model.columns.len().to_string().bright_blue(), "columns".bright_white(), index_count.to_string().bright_blue(), - "indexes".bright_white() + "indexes".bright_white(), + unique_count.to_string().bright_blue(), + "uniques".bright_white() ); } println!();