~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/function_engine/function.h

  • Committer: Monty Taylor
  • Date: 2010-12-27 19:58:09 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101227195809-1k7a4ge19l3u1o1h
Updated pandora-build files to version 0.171

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
25
25
#include <drizzled/session.h>
26
26
#include <drizzled/plugin/storage_engine.h>
27
27
#include <drizzled/plugin/table_function.h>
 
28
#include <drizzled/identifier/schema.h>
28
29
 
29
30
extern const drizzled::CHARSET_INFO *default_charset_info;
30
31
 
34
35
 
35
36
class Function : public drizzled::plugin::StorageEngine
36
37
{
 
38
  drizzled::message::schema::shared_ptr information_message;
 
39
  drizzled::message::schema::shared_ptr data_dictionary_message;
37
40
 
38
41
public:
39
42
  Function(const std::string &name_arg);
43
46
 
44
47
  drizzled::plugin::TableFunction *getTool(const char *name_arg);
45
48
 
46
 
  int doCreateTable(drizzled::Session *,
47
 
                    const char *,
 
49
  int doCreateTable(drizzled::Session&,
48
50
                    drizzled::Table&,
 
51
                    const drizzled::TableIdentifier &,
49
52
                    drizzled::message::Table&)
50
53
  {
51
54
    return EPERM;
52
55
  }
53
56
 
54
 
  int doDropTable(drizzled::Session&, const std::string) 
 
57
  int doDropTable(drizzled::Session&, const drizzled::TableIdentifier&)
55
58
  { 
56
59
    return EPERM; 
57
60
  }
58
61
 
59
 
  virtual drizzled::Cursor *create(drizzled::TableShare &table,
60
 
                                   drizzled::memory::Root *mem_root);
 
62
  virtual drizzled::Cursor *create(drizzled::Table &table);
61
63
 
62
64
  const char **bas_ext() const 
63
65
  {
69
71
    return drizzled::plugin::TableFunction::getFunction(path);
70
72
  }
71
73
 
72
 
  void doGetTableNames(drizzled::CachedDirectory&, 
73
 
                       std::string &db, 
74
 
                       std::set<std::string> &set_of_names);
 
74
  bool doCanCreateTable(const drizzled::TableIdentifier &identifier);
 
75
 
75
76
 
76
77
  int doGetTableDefinition(drizzled::Session &session,
77
 
                           const char *path,
78
 
                           const char *db,
79
 
                           const char *table_name,
80
 
                           const bool is_tmp,
81
 
                           drizzled::message::Table *table_proto);
 
78
                           const drizzled::TableIdentifier &identifier,
 
79
                           drizzled::message::Table &table_message);
 
80
 
 
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 &)
 
88
  {
 
89
    return EPERM;
 
90
  }
 
91
 
 
92
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
 
93
                             const drizzled::SchemaIdentifier &schema_identifier,
 
94
                             drizzled::TableIdentifier::vector &set_of_identifiers);
82
95
};
83
96
 
84
97
#endif /* PLUGIN_FUNCTION_ENGINE_FUNCTION_H */