-
Notifications
You must be signed in to change notification settings - Fork 1
/
sqlhist-defs.h
85 lines (74 loc) · 1.33 KB
/
sqlhist-defs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef _SQLHIST_DEFS_H
#define _SQLHIST_DEFS_H
enum label_type {
LABEL_STRING,
LABEL_EXPR,
};
struct label_map {
struct label_map *next;
enum label_type type;
char *label;
void *value;
};
struct match_map {
struct match_map *next;
const char *A;
const char *B;
};
struct selection {
struct selection *next;
const char *name;
void *item;
};
enum expr_type {
EXPR_FIELD,
EXPR_PLUS,
EXPR_MINUS,
EXPR_MULT,
EXPR_DIVID,
EXPR_FILTER,
};
struct sql_table;
struct expression {
struct expression *next;
struct sqlhist_bison *sb;
enum expr_type type;
void *A;
void *B;
const char *op;
const char *name;
struct sql_table *table;
};
struct table_map {
struct table_map *next;
char *name;
struct sql_table *table;
};
struct sql_table {
char *name;
struct sql_table *parent;
struct sql_table *child;
struct sqlhist_bison *sb;
struct label_map *labels;
struct match_map *matches;
struct table_map *tables;
struct selection *selections;
struct selection **next_selection;
struct expression *from;
struct expression *to;
struct expression *filter;
};
struct sqlhist {
char *start_event;
char *end_event;
char *synth_event;
char *synth_event_def;
char *start_hist;
char *end_hist;
char *start_path;
char *end_path;
char *synth_filter;
char *trace_dir;
char *error;
};
#endif