Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changepacks/changepack_log_yxfVgyJ9VqE-zDgcpYkNm.json
Original file line number Diff line number Diff line change
@@ -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"}
12 changes: 10 additions & 2 deletions crates/vespertide-cli/src/commands/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!();
Expand Down