~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/table_function.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
21
 */
22
22
 
23
 
#pragma once
 
23
#ifndef DRIZZLED_PLUGIN_TABLE_FUNCTION_H
 
24
#define DRIZZLED_PLUGIN_TABLE_FUNCTION_H
24
25
 
25
26
#include <drizzled/definitions.h>
26
 
#include <drizzled/plugin.h>
27
 
#include <drizzled/plugin/plugin.h>
28
 
#include <drizzled/identifier.h>
29
 
#include <drizzled/message/table.pb.h>
30
 
#include <drizzled/charset.h>
31
 
#include <drizzled/field.h>
 
27
#include "drizzled/plugin.h"
 
28
#include "drizzled/plugin/plugin.h"
 
29
#include "drizzled/identifier.h"
 
30
#include "drizzled/message/table.pb.h"
 
31
#include "drizzled/charset.h"
 
32
#include "drizzled/field.h"
32
33
 
33
34
#include <string>
34
35
#include <set>
35
36
#include <algorithm>
36
37
 
37
 
#include <drizzled/visibility.h>
38
 
 
39
 
namespace drizzled {
40
 
namespace plugin {
 
38
#include "drizzled/visibility.h"
 
39
 
 
40
namespace drizzled
 
41
{
 
42
 
 
43
namespace plugin
 
44
{
41
45
 
42
46
#define TABLE_FUNCTION_BLOB_SIZE 2049
43
47
 
84
88
  virtual ~TableFunction() {}
85
89
 
86
90
  static bool addPlugin(TableFunction *function);
87
 
  static void removePlugin(TableFunction *)
 
91
  static void removePlugin(TableFunction *) 
88
92
  { }
89
93
  static TableFunction *getFunction(const std::string &arg);
90
94
  static void getNames(const std::string &arg,
98
102
    SIZE
99
103
  };
100
104
 
101
 
  class Generator
 
105
  class Generator 
102
106
  {
103
107
    Field **columns;
104
108
    Field **columns_iterator;
105
109
    Session *session;
106
110
 
107
111
  protected:
108
 
        LEX& lex();
109
 
        statement::Statement& statement();
110
112
 
111
113
    drizzled::Session &getSession()
112
114
    {
114
116
    }
115
117
 
116
118
  public:
117
 
    const charset_info_st *scs;
 
119
    const CHARSET_INFO *scs;
118
120
 
119
121
    Generator(Field **arg);
120
122
    virtual ~Generator()
141
143
  };
142
144
 
143
145
  void define(message::Table &arg)
144
 
  {
 
146
  { 
145
147
    arg.CopyFrom(proto);
146
148
  }
147
149
 
148
150
  const std::string &getTableLabel()
149
 
  {
 
151
  { 
150
152
    return original_table_label;
151
153
  }
152
154
 
153
155
  const std::string &getIdentifierTableName()
154
 
  {
 
156
  { 
155
157
    return identifier.getTableName();
156
158
  }
157
159
 
158
160
  const std::string &getSchemaHome()
159
 
  {
 
161
  { 
160
162
    return identifier.getSchemaName();
161
163
  }
162
164
 
163
165
  const std::string &getPath()
164
 
  {
 
166
  { 
165
167
    return identifier.getPath();
166
168
  }
167
169
 
183
185
                 uint32_t field_length,
184
186
                 bool is_default_null= false);
185
187
 
186
 
  virtual bool visible() const { return true; }
 
188
  virtual bool visable() { return true; }
187
189
};
188
190
 
189
191
} /* namespace plugin */
190
192
} /* namespace drizzled */
191
193
 
 
194
#endif /* DRIZZLED_PLUGIN_TABLE_FUNCTION_H */