cqlite_cli/repl/commands/
schema.rs1use anyhow::Result;
4use colored::Colorize;
5use std::path::PathBuf;
6
7pub async fn execute_schema_list(schema_paths: &[PathBuf]) -> Result<()> {
20 println!("{}", "=== Loaded Schemas ===".green().bold());
21 println!();
22
23 if schema_paths.is_empty() {
24 println!("{}", "No schemas loaded".yellow());
25 println!(
26 "{}",
27 "Hint: Use :schema load <path> to load schemas".dimmed()
28 );
29 return Ok(());
30 }
31
32 println!("Schema files ({}):", schema_paths.len());
33 for (i, path) in schema_paths.iter().enumerate() {
34 println!(" {}. {}", i + 1, path.display().to_string().green());
35 }
36 println!();
37
38 Ok(())
39}