~drizzle-trunk/drizzle/development

1726.3.6 by LinuxJedi
Add data_dictionary table for drizzle protocol status
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2010 Andrew Hutchings
5
 *
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 2 of the License, or
9
 *  (at your option) any later version.
10
 *
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.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 */
20
1812.3.1 by Brian Aker
This patch encapsulates the MySQL protocol around the Drizzle port so that we have access even in the event of MySQL being installed and running.
21
#ifndef PLUGIN_DRIZZLE_PROTOCOL_STATUS_TABLE_H
22
#define PLUGIN_DRIZZLE_PROTOCOL_STATUS_TABLE_H
1726.3.6 by LinuxJedi
Add data_dictionary table for drizzle protocol status
23
24
#include "drizzled/plugin/table_function.h"
1964.2.9 by Monty Taylor
All protocol stuff except for the buffer_length. WTF?
25
26
namespace drizzle_plugin
27
{
1726.3.6 by LinuxJedi
Add data_dictionary table for drizzle protocol status
28
namespace drizzle_protocol
29
{
30
31
1812.3.1 by Brian Aker
This patch encapsulates the MySQL protocol around the Drizzle port so that we have access even in the event of MySQL being installed and running.
32
class StatusTable : public drizzled::plugin::TableFunction
1726.3.6 by LinuxJedi
Add data_dictionary table for drizzle protocol status
33
{
34
public:
1812.3.1 by Brian Aker
This patch encapsulates the MySQL protocol around the Drizzle port so that we have access even in the event of MySQL being installed and running.
35
  StatusTable() :
1726.3.6 by LinuxJedi
Add data_dictionary table for drizzle protocol status
36
    drizzled::plugin::TableFunction("DATA_DICTIONARY","DRIZZLE_PROTOCOL_STATUS")
37
  {
38
    add_field("VARIABLE_NAME");
39
    add_field("VARIABLE_VALUE");
40
  }
41
42
  class Generator : public drizzled::plugin::TableFunction::Generator
43
  {
44
45
  public:
1812.3.1 by Brian Aker
This patch encapsulates the MySQL protocol around the Drizzle port so that we have access even in the event of MySQL being installed and running.
46
    Generator(drizzled::Field **fields) :
47
      drizzled::plugin::TableFunction::Generator(fields)
48
    {
49
    }
1726.3.6 by LinuxJedi
Add data_dictionary table for drizzle protocol status
50
1812.3.1 by Brian Aker
This patch encapsulates the MySQL protocol around the Drizzle port so that we have access even in the event of MySQL being installed and running.
51
    bool populate()
52
    {
53
      return false;
54
    }
1726.3.6 by LinuxJedi
Add data_dictionary table for drizzle protocol status
55
  };
56
57
  Generator *generator(drizzled::Field **arg)
58
  {
59
    return new Generator(arg);
60
  }
61
};
62
1964.2.9 by Monty Taylor
All protocol stuff except for the buffer_length. WTF?
63
} /* namespace drizzle_protocol */
64
} /* namespace drizzle_plugin */
1726.3.6 by LinuxJedi
Add data_dictionary table for drizzle protocol status
65
1812.3.1 by Brian Aker
This patch encapsulates the MySQL protocol around the Drizzle port so that we have access even in the event of MySQL being installed and running.
66
#endif /* PLUGIN_DRIZZLE_PROTOCOL_STATUS_TABLE_H */