()
| 64 | } |
| 65 | |
| 66 | fn show_tables() -> Result<()> { |
| 67 | println!("\nAvailable tables:\n"); |
| 68 | |
| 69 | let categories = get_tables_by_category(); |
| 70 | let category_order = [ |
| 71 | "CORE", |
| 72 | "REFERENCES", |
| 73 | "CHANGES", |
| 74 | "CONFIGURATION", |
| 75 | "WORKING DIRECTORY", |
| 76 | "OPERATIONAL", |
| 77 | "COMPUTED", |
| 78 | ]; |
| 79 | |
| 80 | for category in category_order { |
| 81 | if let Some(tables) = categories.get(category) { |
| 82 | println!(" {}", category); |
| 83 | for table in tables { |
| 84 | println!(" {:20} {}", table.name, table.description); |
| 85 | } |
| 86 | println!(); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | println!("Use 'vcsql schema <table>' for column details."); |
| 91 | |
| 92 | Ok(()) |
| 93 | } |
| 94 | |
| 95 | fn show_schema(table_name: Option<&str>) -> Result<()> { |
| 96 | match table_name { |
no test coverage detected