~drizzle-trunk/drizzle/development

1273.13.1 by Brian Aker
First pass through data dictionary.
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2009 Sun Microsystems
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
1273.13.65 by Brian Aker
Lint fixes.
21
#ifndef PLUGIN_FUNCTION_ENGINE_FUNCTION_H
22
#define PLUGIN_FUNCTION_ENGINE_FUNCTION_H
1273.14.5 by Monty Taylor
Merged trunk.
23
1273.13.1 by Brian Aker
First pass through data dictionary.
24
#include <assert.h>
25
#include <drizzled/session.h>
26
#include <drizzled/plugin/storage_engine.h>
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
27
#include <drizzled/plugin/table_function.h>
1273.13.1 by Brian Aker
First pass through data dictionary.
28
1273.14.5 by Monty Taylor
Merged trunk.
29
extern const drizzled::CHARSET_INFO *default_charset_info;
1273.13.1 by Brian Aker
First pass through data dictionary.
30
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
31
static const char *function_exts[] = {
1273.13.1 by Brian Aker
First pass through data dictionary.
32
  NULL
33
};
34
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
35
class Function : public drizzled::plugin::StorageEngine
1273.13.1 by Brian Aker
First pass through data dictionary.
36
{
37
38
public:
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
39
  Function(const std::string &name_arg);
1273.13.1 by Brian Aker
First pass through data dictionary.
40
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
41
  ~Function()
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
42
  { }
1273.13.1 by Brian Aker
First pass through data dictionary.
43
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
44
  drizzled::plugin::TableFunction *getTool(const char *name_arg);
1273.13.1 by Brian Aker
First pass through data dictionary.
45
1413 by Brian Aker
doCreateTable() was still taking a pointer instead of a session reference.
46
  int doCreateTable(drizzled::Session&,
1273.14.5 by Monty Taylor
Merged trunk.
47
                    drizzled::Table&,
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
48
                    const drizzled::TableIdentifier &,
1273.13.1 by Brian Aker
First pass through data dictionary.
49
                    drizzled::message::Table&)
50
  {
51
    return EPERM;
52
  }
53
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
54
  int doDropTable(drizzled::Session&, const drizzled::TableIdentifier&)
1273.13.1 by Brian Aker
First pass through data dictionary.
55
  { 
56
    return EPERM; 
57
  }
58
1273.14.5 by Monty Taylor
Merged trunk.
59
  virtual drizzled::Cursor *create(drizzled::TableShare &table,
60
                                   drizzled::memory::Root *mem_root);
1273.13.1 by Brian Aker
First pass through data dictionary.
61
62
  const char **bas_ext() const 
63
  {
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
64
    return function_exts;
1273.13.1 by Brian Aker
First pass through data dictionary.
65
  }
66
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
67
  drizzled::plugin::TableFunction *getFunction(const std::string &path)
68
  {
69
    return drizzled::plugin::TableFunction::getFunction(path);
70
  }
71
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
72
  bool doCanCreateTable(const drizzled::TableIdentifier &identifier);
1320.1.8 by Brian Aker
Temporary fix for allowing engines to say "don't do this".
73
74
1273.13.1 by Brian Aker
First pass through data dictionary.
75
  void doGetTableNames(drizzled::CachedDirectory&, 
1642 by Brian Aker
This adds const to SchemaIdentifier.
76
                       const drizzled::SchemaIdentifier &schema_identifier,
1273.13.1 by Brian Aker
First pass through data dictionary.
77
                       std::set<std::string> &set_of_names);
78
1273.14.5 by Monty Taylor
Merged trunk.
79
  int doGetTableDefinition(drizzled::Session &session,
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
80
                           const drizzled::TableIdentifier &identifier,
1354.1.1 by Brian Aker
Modify ptr to reference.
81
                           drizzled::message::Table &table_message);
1273.20.2 by Brian Aker
Adding on more bits for schema engine.
82
1643.3.3 by Brian Aker
Updated to harmonize the identifier API.
83
  void doGetSchemaIdentifiers(drizzled::SchemaIdentifiers&);
1273.20.2 by Brian Aker
Adding on more bits for schema engine.
84
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
85
  bool doDoesTableExist(drizzled::Session& session, const drizzled::TableIdentifier &identifier);
1358.1.1 by Brian Aker
Fixes regression in performance from Exists patch.
86
1642 by Brian Aker
This adds const to SchemaIdentifier.
87
  bool doGetSchemaDefinition(const drizzled::SchemaIdentifier &schema, drizzled::message::Schema &schema_message);
1389 by Brian Aker
Large reord in ALTER TABLE for RENAME.
88
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
89
  int doRenameTable(drizzled::Session&, const drizzled::TableIdentifier &, const drizzled::TableIdentifier &)
1389 by Brian Aker
Large reord in ALTER TABLE for RENAME.
90
  {
91
    return EPERM;
92
  }
1429.1.3 by Brian Aker
Merge in work for fetching a list of table identifiers.
93
94
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
1642 by Brian Aker
This adds const to SchemaIdentifier.
95
                             const drizzled::SchemaIdentifier &schema_identifier,
1429.1.3 by Brian Aker
Merge in work for fetching a list of table identifiers.
96
                             drizzled::TableIdentifiers &set_of_identifiers);
1273.13.1 by Brian Aker
First pass through data dictionary.
97
};
98
1273.13.65 by Brian Aker
Lint fixes.
99
#endif /* PLUGIN_FUNCTION_ENGINE_FUNCTION_H */