~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
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
21
#pragma once
1273.14.5 by Monty Taylor
Merged trunk.
22
1273.13.1 by Brian Aker
First pass through data dictionary.
23
#include <assert.h>
24
#include <drizzled/plugin/storage_engine.h>
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
25
#include <drizzled/plugin/table_function.h>
1786.3.1 by Monty Taylor
Initial working local catalog.
26
#include <drizzled/identifier/schema.h>
1273.13.1 by Brian Aker
First pass through data dictionary.
27
2254 by Brian Aker
Shift CHARSET_INFO to charset_info_st
28
extern const drizzled::charset_info_st *default_charset_info;
1273.13.1 by Brian Aker
First pass through data dictionary.
29
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
30
static const char *function_exts[] = {
1273.13.1 by Brian Aker
First pass through data dictionary.
31
  NULL
32
};
33
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
34
class Function : public drizzled::plugin::StorageEngine
1273.13.1 by Brian Aker
First pass through data dictionary.
35
{
1966.2.1 by Brian Aker
Clean up style for shared_ptr for messages around table/schema.
36
  drizzled::message::schema::shared_ptr information_message;
37
  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
38
1273.13.1 by Brian Aker
First pass through data dictionary.
39
public:
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
40
  Function(const std::string &name_arg);
1273.13.1 by Brian Aker
First pass through data dictionary.
41
1273.13.18 by Brian Aker
Update code, first pass through cleaner method for recursing through
42
  ~Function()
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
43
  { }
1273.13.1 by Brian Aker
First pass through data dictionary.
44
1273.13.32 by Brian Aker
Big ole patch. This covers moving information_schema to old_* table names
45
  drizzled::plugin::TableFunction *getTool(const char *name_arg);
1273.13.1 by Brian Aker
First pass through data dictionary.
46
1413 by Brian Aker
doCreateTable() was still taking a pointer instead of a session reference.
47
  int doCreateTable(drizzled::Session&,
1273.14.5 by Monty Taylor
Merged trunk.
48
                    drizzled::Table&,
2087.4.2 by Brian Aker
Modify TableIdentifier to fit with the rest of the identifiers.
49
                    const drizzled::identifier::Table &,
2224.4.2 by Brian Aker
Merge in work around making all passing of table as const.
50
                    const drizzled::message::Table&)
1273.13.1 by Brian Aker
First pass through data dictionary.
51
  {
2068.7.1 by Brian Aker
First pass through error correction in SE interface for drop table.
52
    return drizzled::ER_TABLE_PERMISSION_DENIED;
1273.13.1 by Brian Aker
First pass through data dictionary.
53
  }
54
2087.4.2 by Brian Aker
Modify TableIdentifier to fit with the rest of the identifiers.
55
  int doDropTable(drizzled::Session&, const drizzled::identifier::Table&)
1273.13.1 by Brian Aker
First pass through data dictionary.
56
  { 
2068.7.3 by Brian Aker
Merge in work for error messages being standardized by error_t
57
    return drizzled::HA_ERR_NO_SUCH_TABLE; 
1273.13.1 by Brian Aker
First pass through data dictionary.
58
  }
59
1869.1.4 by Brian Aker
TableShare is no longer in the house (i.e. we no longer directly have a copy
60
  virtual drizzled::Cursor *create(drizzled::Table &table);
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
2087.4.2 by Brian Aker
Modify TableIdentifier to fit with the rest of the identifiers.
72
  bool doCanCreateTable(const drizzled::identifier::Table &identifier);
1320.1.8 by Brian Aker
Temporary fix for allowing engines to say "don't do this".
73
74
1273.14.5 by Monty Taylor
Merged trunk.
75
  int doGetTableDefinition(drizzled::Session &session,
2087.4.2 by Brian Aker
Modify TableIdentifier to fit with the rest of the identifiers.
76
                           const drizzled::identifier::Table &identifier,
1354.1.1 by Brian Aker
Modify ptr to reference.
77
                           drizzled::message::Table &table_message);
1273.20.2 by Brian Aker
Adding on more bits for schema engine.
78
2252.1.9 by Olaf van der Spek
Common fwd
79
  void doGetSchemaIdentifiers(drizzled::identifier::schema::vector&);
1273.20.2 by Brian Aker
Adding on more bits for schema engine.
80
2087.4.2 by Brian Aker
Modify TableIdentifier to fit with the rest of the identifiers.
81
  bool doDoesTableExist(drizzled::Session& session, const drizzled::identifier::Table &identifier);
1358.1.1 by Brian Aker
Fixes regression in performance from Exists patch.
82
2159.2.2 by Brian Aker
Remove additional spot where we passed in a reference of a shared pointer.
83
  drizzled::message::schema::shared_ptr doGetSchemaDefinition(const drizzled::identifier::Schema &schema);
1389 by Brian Aker
Large reord in ALTER TABLE for RENAME.
84
2087.4.2 by Brian Aker
Modify TableIdentifier to fit with the rest of the identifiers.
85
  int doRenameTable(drizzled::Session&, const drizzled::identifier::Table &, const drizzled::identifier::Table &)
1389 by Brian Aker
Large reord in ALTER TABLE for RENAME.
86
  {
87
    return EPERM;
88
  }
1429.1.3 by Brian Aker
Merge in work for fetching a list of table identifiers.
89
90
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
2087.4.1 by Brian Aker
Merge in schema identifier.
91
                             const drizzled::identifier::Schema &schema_identifier,
2252.1.9 by Olaf van der Spek
Common fwd
92
                             drizzled::identifier::table::vector &set_of_identifiers);
1273.13.1 by Brian Aker
First pass through data dictionary.
93
};
94