dm_database_parser_sqllog/
sqllog.rs

1#[derive(Debug, PartialEq)]
2pub struct Sqllog {
3    pub sqllog_datetime: String,
4    pub ep: u8,
5    pub thread_id: i64,
6    pub username: String,
7    pub trxid: i64,
8    pub statement: String,
9    pub appname: String,
10    pub client_ip: String,
11    pub sql_type: String,
12    pub description: String,
13    pub execute_time: f32,
14    pub row_count: u32,
15    pub execute_id: i64,
16}
17
18impl Sqllog {
19    pub fn new() -> Self {
20        Self {
21            sqllog_datetime: String::new(),
22            ep: 0,
23            thread_id: 0,
24            username: String::new(),
25            trxid: 0,
26            statement: String::new(),
27            appname: String::new(),
28            client_ip: String::new(),
29            sql_type: String::new(),
30            description: String::new(),
31            execute_time: 0.0,
32            row_count: 0,
33            execute_id: 0,
34        }
35    }
36}
37
38impl Default for Sqllog {
39    fn default() -> Self {
40        Self::new()
41    }
42}