~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:
3
3
 *
4
4
 *  Definitions required for TableFunction plugin
5
5
 *
6
 
 *  Copyright (C) 2010 Sun Microsystems
 
6
 *  Copyright (C) 2010 Sun Microsystems, Inc.
7
7
 *  Copyright (C) 2010 Monty Taylor
8
8
 *
9
9
 *  This program is free software; you can redistribute it and/or modify
35
35
#include <set>
36
36
#include <algorithm>
37
37
 
 
38
#include "drizzled/visibility.h"
 
39
 
38
40
namespace drizzled
39
41
{
40
42
 
41
 
extern int wild_case_compare(const CHARSET_INFO * const cs, 
42
 
                             const char *str,const char *wildstr);
43
 
 
44
43
namespace plugin
45
44
{
46
45
 
 
46
#define TABLE_FUNCTION_BLOB_SIZE 2049
 
47
 
47
48
// Not thread safe, but plugins are just loaded in a single thread right
48
49
// now.
49
50
static const char *local_string_append(const char *arg1, const char *arg2)
59
60
  return buffer;
60
61
}
61
62
 
62
 
class TableFunction : public Plugin
 
63
class DRIZZLED_API TableFunction : public Plugin
63
64
{
64
65
  TableFunction();
65
66
  TableFunction(const TableFunction &);
66
67
  TableFunction& operator=(const TableFunction &);
67
68
 
68
69
  message::Table proto;
69
 
  TableIdentifier identifier;
 
70
  identifier::Table identifier;
70
71
  std::string local_path;
71
72
  std::string original_table_label;
72
73
 
74
75
 
75
76
  void init();
76
77
 
 
78
 
77
79
public:
78
80
  TableFunction(const char *schema_arg, const char *table_arg) :
79
81
    Plugin(local_string_append(schema_arg, table_arg) , "TableFunction"),
96
98
    BOOLEAN,
97
99
    NUMBER,
98
100
    STRING,
99
 
    VARBINARY
 
101
    VARBINARY,
 
102
    SIZE
100
103
  };
101
104
 
102
105
  class Generator 
181
184
                 TableFunction::ColumnType type,
182
185
                 uint32_t field_length,
183
186
                 bool is_default_null= false);
 
187
 
 
188
  virtual bool visable() { return true; }
184
189
};
185
190
 
186
191
} /* namespace plugin */