My Project
opt_explain_json.h
00001 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software Foundation,
00014    51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
00015 
00016 
00017 #ifndef OPT_EXPLAIN_FORMAT_JSON_INCLUDED
00018 #define OPT_EXPLAIN_FORMAT_JSON_INCLUDED
00019 
00020 #include "opt_explain_format.h"
00021 
00022 namespace opt_explain_json_namespace
00023 {
00024   class context;
00025 }
00026 
00031 class Explain_format_JSON : public Explain_format
00032 {
00033 private:
00034   opt_explain_json_namespace::context *current_context; 
00035   select_result *output;
00036 
00037 public:
00038   Explain_format_JSON() : current_context(NULL), output(NULL) {}
00039 
00040   virtual bool is_hierarchical() const { return true; }
00041   virtual bool send_headers(select_result *result);
00042   virtual bool begin_context(Explain_context_enum context,
00043                              SELECT_LEX_UNIT *subquery,
00044                              const Explain_format_flags *flags);
00045   virtual bool end_context(Explain_context_enum context);
00046   virtual bool flush_entry() { return false; }
00047   virtual qep_row *entry();
00048 };
00049 
00050 #endif//OPT_EXPLAIN_FORMAT_JSON_INCLUDED
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines