MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / evaluate_show_tables_query

Function evaluate_show_tables_query

crates/gitql-engine/src/engine.rs:208–223  ·  view source on GitHub ↗
(env: &mut Environment)

Source from the content-addressed store, hash-verified

206}
207
208fn 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
225fn remove_hidden_selected_from_groups(
226 titles: &mut Vec<String>,

Callers 1

evaluateFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…