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

Function select_all_table_fields

crates/gitql-parser/src/parser.rs:3907–3927  ·  view source on GitHub ↗
(
    env: &mut Environment,
    table_name: &[String],
    selected_fields: &mut Vec<String>,
    fields_names: &mut Vec<String>,
)

Source from the content-addressed store, hash-verified

3905
3906#[inline(always)]
3907fn select_all_table_fields(
3908 env: &mut Environment,
3909 table_name: &[String],
3910 selected_fields: &mut Vec<String>,
3911 fields_names: &mut Vec<String>,
3912) {
3913 let mut tables_columns: Vec<&str> = vec![];
3914 for table in table_name {
3915 let columns = env.schema.tables_fields_names.get(table.as_str()).unwrap();
3916 for column in columns {
3917 tables_columns.push(column);
3918 }
3919 }
3920
3921 for field in tables_columns {
3922 if !fields_names.contains(&field.to_string()) {
3923 fields_names.push(field.to_string());
3924 selected_fields.push(field.to_string());
3925 }
3926 }
3927}
3928
3929#[inline(always)]
3930pub(crate) fn apply_not_keyword_if_exists(

Callers 1

parse_select_statementFunction · 0.85

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…