~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/function_engine/function.h

  • Committer: patrick crews
  • Date: 2011-06-08 03:02:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2329.
  • Revision ID: gleebix@gmail.com-20110608030227-updkyv2652zvfajc
Initial voodoo worked to give us a crashme mode.  Need docs still

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems
 
4
 *  Copyright (C) 2009 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef PLUGIN_FUNCTION_ENGINE_FUNCTION_H
22
 
#define PLUGIN_FUNCTION_ENGINE_FUNCTION_H
 
21
#pragma once
23
22
 
24
23
#include <assert.h>
25
 
#include <drizzled/session.h>
26
24
#include <drizzled/plugin/storage_engine.h>
27
25
#include <drizzled/plugin/table_function.h>
28
26
#include <drizzled/identifier/schema.h>
29
27
 
30
 
extern const drizzled::CHARSET_INFO *default_charset_info;
 
28
extern const drizzled::charset_info_st *default_charset_info;
31
29
 
32
30
static const char *function_exts[] = {
33
31
  NULL
48
46
 
49
47
  int doCreateTable(drizzled::Session&,
50
48
                    drizzled::Table&,
51
 
                    const drizzled::TableIdentifier &,
52
 
                    drizzled::message::Table&)
 
49
                    const drizzled::identifier::Table &,
 
50
                    const drizzled::message::Table&)
53
51
  {
54
 
    return EPERM;
 
52
    return drizzled::ER_TABLE_PERMISSION_DENIED;
55
53
  }
56
54
 
57
 
  int doDropTable(drizzled::Session&, const drizzled::TableIdentifier&)
 
55
  int doDropTable(drizzled::Session&, const drizzled::identifier::Table&)
58
56
  { 
59
 
    return EPERM; 
 
57
    return drizzled::HA_ERR_NO_SUCH_TABLE; 
60
58
  }
61
59
 
62
60
  virtual drizzled::Cursor *create(drizzled::Table &table);
71
69
    return drizzled::plugin::TableFunction::getFunction(path);
72
70
  }
73
71
 
74
 
  bool doCanCreateTable(const drizzled::TableIdentifier &identifier);
 
72
  bool doCanCreateTable(const drizzled::identifier::Table &identifier);
75
73
 
76
74
 
77
75
  int doGetTableDefinition(drizzled::Session &session,
78
 
                           const drizzled::TableIdentifier &identifier,
 
76
                           const drizzled::identifier::Table &identifier,
79
77
                           drizzled::message::Table &table_message);
80
78
 
81
 
  void doGetSchemaIdentifiers(drizzled::SchemaIdentifier::vector&);
82
 
 
83
 
  bool doDoesTableExist(drizzled::Session& session, const drizzled::TableIdentifier &identifier);
84
 
 
85
 
  bool doGetSchemaDefinition(const drizzled::SchemaIdentifier &schema, drizzled::message::schema::shared_ptr &schema_message);
86
 
 
87
 
  int doRenameTable(drizzled::Session&, const drizzled::TableIdentifier &, const drizzled::TableIdentifier &)
 
79
  void doGetSchemaIdentifiers(drizzled::identifier::schema::vector&);
 
80
 
 
81
  bool doDoesTableExist(drizzled::Session& session, const drizzled::identifier::Table &identifier);
 
82
 
 
83
  drizzled::message::schema::shared_ptr doGetSchemaDefinition(const drizzled::identifier::Schema &schema);
 
84
 
 
85
  int doRenameTable(drizzled::Session&, const drizzled::identifier::Table &, const drizzled::identifier::Table &)
88
86
  {
89
87
    return EPERM;
90
88
  }
91
89
 
92
90
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
93
 
                             const drizzled::SchemaIdentifier &schema_identifier,
94
 
                             drizzled::TableIdentifier::vector &set_of_identifiers);
 
91
                             const drizzled::identifier::Schema &schema_identifier,
 
92
                             drizzled::identifier::table::vector &set_of_identifiers);
95
93
};
96
94
 
97
 
#endif /* PLUGIN_FUNCTION_ENGINE_FUNCTION_H */