MCPcopy Create free account
hub / github.com/douglance/devsql / show_tables

Function show_tables

crates/vcsql/src/main.rs:66–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66fn 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
95fn show_schema(table_name: Option<&str>) -> Result<()> {
96 match table_name {

Callers 1

mainFunction · 0.85

Calls 1

get_tables_by_categoryFunction · 0.85

Tested by

no test coverage detected