@@ -9,31 +9,23 @@ use gitql_core::environment::Environment;
9
9
use gitql_core:: schema:: Schema ;
10
10
use gitql_std:: aggregation:: aggregation_function_signatures;
11
11
use gitql_std:: aggregation:: aggregation_functions;
12
- use gitql_std:: standard:: standard_function_signatures;
13
- use gitql_std:: standard:: standard_functions;
14
12
use gitql_std:: window:: window_function_signatures;
15
13
use gitql_std:: window:: window_functions;
16
14
15
+ use super :: functions:: clang_ql_functions;
16
+ use super :: functions:: clang_ql_functions_signatures;
17
+ use super :: types:: FunctionType ;
17
18
use super :: types:: SourceLocType ;
18
19
19
20
fn tables_fields_types ( ) -> HashMap < & ' static str , Box < dyn DataType > > {
20
21
let mut map: HashMap < & ' static str , Box < dyn DataType > > = HashMap :: new ( ) ;
21
22
map. insert ( "name" , Box :: new ( TextType ) ) ;
22
23
map. insert ( "type" , Box :: new ( TextType ) ) ;
23
24
map. insert ( "signature" , Box :: new ( TextType ) ) ;
24
- map. insert ( "class_name " , Box :: new ( TextType ) ) ;
25
+ map. insert ( "ast_function " , Box :: new ( FunctionType ) ) ;
25
26
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 ) ) ;
34
27
map. insert ( "is_volatile" , Box :: new ( BoolType ) ) ;
35
28
map. insert ( "is_struct" , Box :: new ( BoolType ) ) ;
36
- map. insert ( "has_template" , Box :: new ( BoolType ) ) ;
37
29
38
30
map. insert ( "return_type" , Box :: new ( TextType ) ) ;
39
31
map. insert ( "type_literal" , Box :: new ( TextType ) ) ;
@@ -47,7 +39,6 @@ fn tables_fields_types() -> HashMap<&'static str, Box<dyn DataType>> {
47
39
map. insert ( "size" , Box :: new ( IntType ) ) ;
48
40
map. insert ( "align" , Box :: new ( IntType ) ) ;
49
41
50
- // Source code location columns
51
42
map. insert ( "source_loc" , Box :: new ( SourceLocType ) ) ;
52
43
map
53
44
}
@@ -79,17 +70,8 @@ fn tables_fields_names() -> &'static HashMap<&'static str, Vec<&'static str>> {
79
70
vec ! [
80
71
"name" ,
81
72
"signature" ,
82
- "args_count" ,
83
73
"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" ,
93
75
"source_loc" ,
94
76
] ,
95
77
) ;
@@ -104,8 +86,8 @@ pub fn create_clang_ql_environment() -> Environment {
104
86
tables_fields_types : tables_fields_types ( ) . to_owned ( ) ,
105
87
} ;
106
88
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 ( ) ;
109
91
110
92
let aggregation_signatures = aggregation_function_signatures ( ) ;
111
93
let aggregation_functions = aggregation_functions ( ) ;
0 commit comments