| 206 | } |
| 207 | |
| 208 | fn evaluate_show_tables_query(env: &mut Environment) -> Result<EvaluationResult, String> { |
| 209 | let tables = env.schema.tables_fields_names.keys(); |
| 210 | |
| 211 | let mut rows: Vec<Row> = Vec::with_capacity(tables.len()); |
| 212 | for table in env.schema.tables_fields_names.keys() { |
| 213 | let values: Vec<Box<dyn Value>> = |
| 214 | vec![Box::new(TextValue::new(table.to_owned().to_owned()))]; |
| 215 | rows.push(Row { values }); |
| 216 | } |
| 217 | |
| 218 | let mut gitql_object = GitQLObject::default(); |
| 219 | gitql_object.titles.push("Tables".to_owned()); |
| 220 | gitql_object.groups.push(Group { rows }); |
| 221 | |
| 222 | Ok(EvaluationResult::SelectedGroups(gitql_object)) |
| 223 | } |
| 224 | |
| 225 | fn remove_hidden_selected_from_groups( |
| 226 | titles: &mut Vec<String>, |