Skip to content

Commit 585928c

Browse files
authored
Merge pull request #39 from dev-five-git/show-unique-on-status
Fix inline primary key issue
2 parents d2bb30e + 8b7e394 commit 585928c

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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"}

crates/vespertide-cli/src/commands/status.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,22 @@ pub fn cmd_status() -> Result<()> {
8181
.iter()
8282
.filter(|c| matches!(c, vespertide_core::TableConstraint::Index { .. }))
8383
.count();
84+
// Count Unique constraints
85+
let unique_count = model
86+
.constraints
87+
.iter()
88+
.filter(|c| matches!(c, vespertide_core::TableConstraint::Unique { .. }))
89+
.count();
8490
println!(
85-
" {} {} ({} {}, {} {})",
91+
" {} {} ({} {}, {} {}, {} {})",
8692
"-".bright_white(),
8793
model.name.bright_green(),
8894
model.columns.len().to_string().bright_blue(),
8995
"columns".bright_white(),
9096
index_count.to_string().bright_blue(),
91-
"indexes".bright_white()
97+
"indexes".bright_white(),
98+
unique_count.to_string().bright_blue(),
99+
"uniques".bright_white()
92100
);
93101
}
94102
println!();

0 commit comments

Comments
 (0)