MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
opt_explain_json.h
1 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation; version 2 of the License.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software Foundation,
14  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
15 
16 
17 #ifndef OPT_EXPLAIN_FORMAT_JSON_INCLUDED
18 #define OPT_EXPLAIN_FORMAT_JSON_INCLUDED
19 
20 #include "opt_explain_format.h"
21 
22 namespace opt_explain_json_namespace
23 {
24  class context;
25 }
26 
32 {
33 private:
34  opt_explain_json_namespace::context *current_context;
35  select_result *output;
36 
37 public:
38  Explain_format_JSON() : current_context(NULL), output(NULL) {}
39 
40  virtual bool is_hierarchical() const { return true; }
41  virtual bool send_headers(select_result *result);
42  virtual bool begin_context(Explain_context_enum context,
43  SELECT_LEX_UNIT *subquery,
45  virtual bool end_context(Explain_context_enum context);
46  virtual bool flush_entry() { return false; }
47  virtual qep_row *entry();
48 };
49 
50 #endif//OPT_EXPLAIN_FORMAT_JSON_INCLUDED