~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/table_function.h

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

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