~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
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
4
 *  Copyright (C) 2009 Sun Microsystems, Inc.
1273.13.1 by Brian Aker
First pass through data dictionary.
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>
1786.3.1 by Monty Taylor
Initial working local catalog.
28
#include <drizzled/identifier/schema.h>
1273.13.1 by Brian Aker
First pass through data dictionary.
29
1273.14.5 by Monty Taylor
Merged trunk.
30
extern const drizzled::CHARSET_INFO *default_charset_info;
1273.13.1 by Brian Aker
First pass through data dictionary.
31
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
32
static const char *function_exts[] = {
1273.13.1 by Brian Aker
First pass through data dictionary.
33
  NULL
34
};
35
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
36
class Function : public drizzled::plugin::StorageEngine
1273.13.1 by Brian Aker
First pass through data dictionary.
37
{
1966.2.1 by Brian Aker
Clean up style for shared_ptr for messages around table/schema.
38
  drizzled::message::schema::shared_ptr information_message;
39
  drizzled::message::schema::shared_ptr data_dictionary_message;
1812.3.8 by Brian Aker
This switches our schema system over to using a shared ptr. Lets see how
40
1273.13.1 by Brian Aker
First pass through data dictionary.
41
public:
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
42
  Function(const std::string &name_arg);
1273.13.1 by Brian Aker
First pass through data dictionary.
43
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
44
  ~Function()
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
45
  { }
1273.13.1 by Brian Aker
First pass through data dictionary.
46
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
47
  drizzled::plugin::TableFunction *getTool(const char *name_arg);
1273.13.1 by Brian Aker
First pass through data dictionary.
48
1413 by Brian Aker
doCreateTable() was still taking a pointer instead of a session reference.
49
  int doCreateTable(drizzled::Session&,
1273.14.5 by Monty Taylor
Merged trunk.
50
                    drizzled::Table&,
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
51
                    const drizzled::TableIdentifier &,
1273.13.1 by Brian Aker
First pass through data dictionary.
52
                    drizzled::message::Table&)
53
  {
54
    return EPERM;
55
  }
56
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
57
  int doDropTable(drizzled::Session&, const drizzled::TableIdentifier&)
1273.13.1 by Brian Aker
First pass through data dictionary.
58
  { 
59
    return EPERM; 
60
  }
61
1869.1.4 by Brian Aker
TableShare is no longer in the house (i.e. we no longer directly have a copy
62
  virtual drizzled::Cursor *create(drizzled::Table &table);
1273.13.1 by Brian Aker
First pass through data dictionary.
63
64
  const char **bas_ext() const 
65
  {
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
66
    return function_exts;
1273.13.1 by Brian Aker
First pass through data dictionary.
67
  }
68
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
69
  drizzled::plugin::TableFunction *getFunction(const std::string &path)
70
  {
71
    return drizzled::plugin::TableFunction::getFunction(path);
72
  }
73
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
74
  bool doCanCreateTable(const drizzled::TableIdentifier &identifier);
1320.1.8 by Brian Aker
Temporary fix for allowing engines to say "don't do this".
75
76
1273.14.5 by Monty Taylor
Merged trunk.
77
  int doGetTableDefinition(drizzled::Session &session,
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
78
                           const drizzled::TableIdentifier &identifier,
1354.1.1 by Brian Aker
Modify ptr to reference.
79
                           drizzled::message::Table &table_message);
1273.20.2 by Brian Aker
Adding on more bits for schema engine.
80
1966.2.3 by Brian Aker
Fix another style issue.
81
  void doGetSchemaIdentifiers(drizzled::SchemaIdentifier::vector&);
1273.20.2 by Brian Aker
Adding on more bits for schema engine.
82
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
83
  bool doDoesTableExist(drizzled::Session& session, const drizzled::TableIdentifier &identifier);
1358.1.1 by Brian Aker
Fixes regression in performance from Exists patch.
84
1966.2.1 by Brian Aker
Clean up style for shared_ptr for messages around table/schema.
85
  bool doGetSchemaDefinition(const drizzled::SchemaIdentifier &schema, drizzled::message::schema::shared_ptr &schema_message);
1389 by Brian Aker
Large reord in ALTER TABLE for RENAME.
86
1618.1.1 by Brian Aker
Modify TableIdentifier to be const
87
  int doRenameTable(drizzled::Session&, const drizzled::TableIdentifier &, const drizzled::TableIdentifier &)
1389 by Brian Aker
Large reord in ALTER TABLE for RENAME.
88
  {
89
    return EPERM;
90
  }
1429.1.3 by Brian Aker
Merge in work for fetching a list of table identifiers.
91
92
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
1642 by Brian Aker
This adds const to SchemaIdentifier.
93
                             const drizzled::SchemaIdentifier &schema_identifier,
1966.2.4 by Brian Aker
Style cleanup.
94
                             drizzled::TableIdentifier::vector &set_of_identifiers);
1273.13.1 by Brian Aker
First pass through data dictionary.
95
};
96
1273.13.65 by Brian Aker
Lint fixes.
97
#endif /* PLUGIN_FUNCTION_ENGINE_FUNCTION_H */