1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright 2011 Daniel Nichter
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
27
* Defines the event_t struct that encapsulates an event.
30
* An event (i.e. a query) has the attributes defined in the event_t struct.
31
* The values come from various members of the Session class. This is
32
* a necessary redundancy for two reasons. First, access to this data via
33
* the Session class is not uniform; it requires various calls and
34
* calculations. Look at QueryLog::afterStatement() to see this. Second,
35
* because the QueryLog object controls the logger classes, i.e.
36
* QueryLoggerFile and others in the futre, event creation and filtering
37
* is done in one place (QueryLog::afterStatement()) and then acceptable
38
* events are passed to the logger classes so that all they have to do is log.
40
* Since this is just a collection of variables, making this a class
41
* with accessor functions is overkill.
44
// GMT timestamps (2002-01-31T10:00:01.123456)
50
uint32_t rows_examined;
56
double execution_time;
60
// bools ("true" or "false")
63
// strings, not quoted or escaped
66
// query, not quoted or escaped