@@ -9,31 +9,23 @@ use gitql_core::environment::Environment;
99use gitql_core:: schema:: Schema ;
1010use gitql_std:: aggregation:: aggregation_function_signatures;
1111use gitql_std:: aggregation:: aggregation_functions;
12- use gitql_std:: standard:: standard_function_signatures;
13- use gitql_std:: standard:: standard_functions;
1412use gitql_std:: window:: window_function_signatures;
1513use gitql_std:: window:: window_functions;
1614
15+ use super :: functions:: clang_ql_functions;
16+ use super :: functions:: clang_ql_functions_signatures;
17+ use super :: types:: FunctionType ;
1718use super :: types:: SourceLocType ;
1819
1920fn tables_fields_types ( ) -> HashMap < & ' static str , Box < dyn DataType > > {
2021 let mut map: HashMap < & ' static str , Box < dyn DataType > > = HashMap :: new ( ) ;
2122 map. insert ( "name" , Box :: new ( TextType ) ) ;
2223 map. insert ( "type" , Box :: new ( TextType ) ) ;
2324 map. insert ( "signature" , Box :: new ( TextType ) ) ;
24- map. insert ( "class_name " , Box :: new ( TextType ) ) ;
25+ map. insert ( "ast_function " , Box :: new ( FunctionType ) ) ;
2526
26- map. insert ( "access_modifier" , Box :: new ( IntType ) ) ;
27-
28- map. insert ( "is_method" , Box :: new ( BoolType ) ) ;
29- map. insert ( "is_virtual" , Box :: new ( BoolType ) ) ;
30- map. insert ( "is_pure_virtual" , Box :: new ( BoolType ) ) ;
31- map. insert ( "is_static" , Box :: new ( BoolType ) ) ;
32- map. insert ( "is_const" , Box :: new ( BoolType ) ) ;
33- map. insert ( "is_variadic" , Box :: new ( BoolType ) ) ;
3427 map. insert ( "is_volatile" , Box :: new ( BoolType ) ) ;
3528 map. insert ( "is_struct" , Box :: new ( BoolType ) ) ;
36- map. insert ( "has_template" , Box :: new ( BoolType ) ) ;
3729
3830 map. insert ( "return_type" , Box :: new ( TextType ) ) ;
3931 map. insert ( "type_literal" , Box :: new ( TextType ) ) ;
@@ -47,7 +39,6 @@ fn tables_fields_types() -> HashMap<&'static str, Box<dyn DataType>> {
4739 map. insert ( "size" , Box :: new ( IntType ) ) ;
4840 map. insert ( "align" , Box :: new ( IntType ) ) ;
4941
50- // Source code location columns
5142 map. insert ( "source_loc" , Box :: new ( SourceLocType ) ) ;
5243 map
5344}
@@ -79,17 +70,8 @@ fn tables_fields_names() -> &'static HashMap<&'static str, Vec<&'static str>> {
7970 vec ! [
8071 "name" ,
8172 "signature" ,
82- "args_count" ,
8373 "return_type" ,
84- "class_name" ,
85- "is_method" ,
86- "is_virtual" ,
87- "is_pure_virtual" ,
88- "is_static" ,
89- "is_const" ,
90- "has_template" ,
91- "access_modifier" ,
92- "is_variadic" ,
74+ "ast_function" ,
9375 "source_loc" ,
9476 ] ,
9577 ) ;
@@ -104,8 +86,8 @@ pub fn create_clang_ql_environment() -> Environment {
10486 tables_fields_types : tables_fields_types ( ) . to_owned ( ) ,
10587 } ;
10688
107- let std_signatures = standard_function_signatures ( ) ;
108- let std_functions = standard_functions ( ) ;
89+ let std_signatures = clang_ql_functions_signatures ( ) ;
90+ let std_functions = clang_ql_functions ( ) ;
10991
11092 let aggregation_signatures = aggregation_function_signatures ( ) ;
11193 let aggregation_functions = aggregation_functions ( ) ;
0 commit comments