~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/function_engine/function.h

  • Committer: Brian Aker
  • Date: 2010-07-30 20:31:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1679.
  • Revision ID: brian@gaz-20100730203119-89g2ye4zwnvcacxg
First pass in encapsulating row

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, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
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>
29
28
 
30
29
extern const drizzled::CHARSET_INFO *default_charset_info;
31
30
 
35
34
 
36
35
class Function : public drizzled::plugin::StorageEngine
37
36
{
38
 
  drizzled::message::schema::shared_ptr information_message;
39
 
  drizzled::message::schema::shared_ptr data_dictionary_message;
40
37
 
41
38
public:
42
39
  Function(const std::string &name_arg);
48
45
 
49
46
  int doCreateTable(drizzled::Session&,
50
47
                    drizzled::Table&,
51
 
                    const drizzled::identifier::Table &,
 
48
                    const drizzled::TableIdentifier &,
52
49
                    drizzled::message::Table&)
53
50
  {
54
 
    return drizzled::ER_TABLE_PERMISSION_DENIED;
 
51
    return EPERM;
55
52
  }
56
53
 
57
 
  int doDropTable(drizzled::Session&, const drizzled::identifier::Table&)
 
54
  int doDropTable(drizzled::Session&, const drizzled::TableIdentifier&)
58
55
  { 
59
 
    return drizzled::HA_ERR_NO_SUCH_TABLE; 
 
56
    return EPERM; 
60
57
  }
61
58
 
62
 
  virtual drizzled::Cursor *create(drizzled::Table &table);
 
59
  virtual drizzled::Cursor *create(drizzled::TableShare &table,
 
60
                                   drizzled::memory::Root *mem_root);
63
61
 
64
62
  const char **bas_ext() const 
65
63
  {
71
69
    return drizzled::plugin::TableFunction::getFunction(path);
72
70
  }
73
71
 
74
 
  bool doCanCreateTable(const drizzled::identifier::Table &identifier);
75
 
 
 
72
  bool doCanCreateTable(const drizzled::TableIdentifier &identifier);
 
73
 
 
74
 
 
75
  void doGetTableNames(drizzled::CachedDirectory&, 
 
76
                       const drizzled::SchemaIdentifier &schema_identifier,
 
77
                       std::set<std::string> &set_of_names);
76
78
 
77
79
  int doGetTableDefinition(drizzled::Session &session,
78
 
                           const drizzled::identifier::Table &identifier,
 
80
                           const drizzled::TableIdentifier &identifier,
79
81
                           drizzled::message::Table &table_message);
80
82
 
81
 
  void doGetSchemaIdentifiers(drizzled::identifier::Schema::vector&);
82
 
 
83
 
  bool doDoesTableExist(drizzled::Session& session, const drizzled::identifier::Table &identifier);
84
 
 
85
 
  bool doGetSchemaDefinition(const drizzled::identifier::Schema &schema, drizzled::message::schema::shared_ptr &schema_message);
86
 
 
87
 
  int doRenameTable(drizzled::Session&, const drizzled::identifier::Table &, const drizzled::identifier::Table &)
 
83
  void doGetSchemaIdentifiers(drizzled::SchemaIdentifiers&);
 
84
 
 
85
  bool doDoesTableExist(drizzled::Session& session, const drizzled::TableIdentifier &identifier);
 
86
 
 
87
  bool doGetSchemaDefinition(const drizzled::SchemaIdentifier &schema, drizzled::message::Schema &schema_message);
 
88
 
 
89
  int doRenameTable(drizzled::Session&, const drizzled::TableIdentifier &, const drizzled::TableIdentifier &)
88
90
  {
89
91
    return EPERM;
90
92
  }
91
93
 
92
94
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
93
 
                             const drizzled::identifier::Schema &schema_identifier,
94
 
                             drizzled::identifier::Table::vector &set_of_identifiers);
 
95
                             const drizzled::SchemaIdentifier &schema_identifier,
 
96
                             drizzled::TableIdentifiers &set_of_identifiers);
95
97
};
96
98
 
97
99
#endif /* PLUGIN_FUNCTION_ENGINE_FUNCTION_H */