| 150 | } |
| 151 | |
| 152 | fn get_name_and_description(&self) -> (&'static str, &'static str) { |
| 153 | match self { |
| 154 | Self::Quit => ("\\q", "quit datafusion-cli"), |
| 155 | Self::ListTables => ("\\d", "list tables"), |
| 156 | Self::DescribeTableStmt(_) => ("\\d name", "describe table"), |
| 157 | Self::Help => ("\\?", "help"), |
| 158 | Self::Include(_) => { |
| 159 | ("\\i filename", "reads input from the specified filename") |
| 160 | } |
| 161 | Self::ListFunctions => ("\\h", "function list"), |
| 162 | Self::SearchFunctions(_) => ("\\h function", "search function"), |
| 163 | Self::QuietMode(_) => ("\\quiet (true|false)?", "print or set quiet mode"), |
| 164 | Self::OutputFormat(_) => { |
| 165 | ("\\pset [NAME [VALUE]]", "set table output option\n(format)") |
| 166 | } |
| 167 | Self::ObjectStoreProfileMode(_) => ( |
| 168 | "\\object_store_profiling (disabled|summary|trace)", |
| 169 | "print or set object store profile mode", |
| 170 | ), |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | const ALL_COMMANDS: [Command; 10] = [ |