~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_engine/schema.h

  • Committer: Djellel E. Difallah
  • Date: 2010-04-02 07:45:12 UTC
  • mfrom: (1435 bad-staging)
  • mto: This revision was merged to the branch mainline in revision 1440.
  • Revision ID: ded@ubuntu-20100402074512-rck7fl88o76h9tya
merge to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
class Schema : public drizzled::plugin::StorageEngine
38
38
{
39
 
  bool writeSchemaFile(const char *path, const drizzled::message::Schema &db);
40
 
  bool readTableFile(const std::string &path, drizzled::message::Table &table_message);
41
 
  bool readSchemaFile(const std::string &path, drizzled::message::Schema &schema);
 
39
  bool writeSchemaFile(drizzled::SchemaIdentifier &schema_identifier, const drizzled::message::Schema &db);
 
40
  bool readSchemaFile(const std::string &schema_file_name, drizzled::message::Schema &schema);
42
41
 
43
42
  void prime();
44
43
 
53
52
 
54
53
  ~Schema();
55
54
 
56
 
  int doCreateTable(drizzled::Session *,
57
 
                    drizzled::Table&,
58
 
                    drizzled::TableIdentifier &,
59
 
                    drizzled::message::Table&)
60
 
  {
61
 
    return EPERM;
62
 
  }
63
 
 
64
 
  int doDropTable(drizzled::Session&, drizzled::TableIdentifier &identifier);
65
 
 
66
 
  bool doCanCreateTable(const drizzled::TableIdentifier &identifier);
 
55
 
 
56
  bool doCanCreateTable(drizzled::TableIdentifier &identifier);
67
57
 
68
58
  drizzled::Cursor *create(drizzled::TableShare &,
69
59
                           drizzled::memory::Root *)
71
61
    return NULL;
72
62
  }
73
63
 
74
 
  void doGetSchemaNames(std::set<std::string>& set_of_names);
75
 
  bool doGetSchemaDefinition(const std::string &schema_name, drizzled::message::Schema &proto);
 
64
  void doGetSchemaIdentifiers(drizzled::SchemaIdentifierList &set_of_names);
 
65
  bool doGetSchemaDefinition(drizzled::SchemaIdentifier&, drizzled::message::Schema &proto);
76
66
 
77
67
  bool doCreateSchema(const drizzled::message::Schema &schema_message);
78
68
 
79
69
  bool doAlterSchema(const drizzled::message::Schema &schema_message);
80
70
 
81
 
  bool doDropSchema(const std::string &schema_name);
82
 
 
83
 
  int doGetTableDefinition(drizzled::Session& session,
84
 
                           drizzled::TableIdentifier &identifier,
85
 
                           drizzled::message::Table &table_proto);
86
 
 
87
 
  void doGetTableNames(drizzled::CachedDirectory &directory,
88
 
                       std::string &db_name,
89
 
                       std::set<std::string> &set_of_names);
90
 
 
91
 
  bool doDoesTableExist(drizzled::Session& session, drizzled::TableIdentifier &identifier);
92
 
 
93
 
  int doRenameTable(drizzled::Session&, drizzled::TableIdentifier &, drizzled::TableIdentifier &)
94
 
  {
95
 
    return EPERM;
 
71
  bool doDropSchema(drizzled::SchemaIdentifier&);
 
72
 
 
73
  // Below are table methods that we don't implement (and don't need)
 
74
 
 
75
  int doGetTableDefinition(drizzled::Session&,
 
76
                           drizzled::TableIdentifier&,
 
77
                           drizzled::message::Table&)
 
78
  {
 
79
    return ENOENT;
 
80
  }
 
81
 
 
82
 
 
83
  void doGetTableNames(drizzled::CachedDirectory&,
 
84
                       drizzled::SchemaIdentifier&,
 
85
                       std::set<std::string>&)
 
86
  {
 
87
  }
 
88
 
 
89
  bool doDoesTableExist(drizzled::Session&, drizzled::TableIdentifier&)
 
90
  {
 
91
    return false;
 
92
  }
 
93
 
 
94
  int doRenameTable(drizzled::Session&, drizzled::TableIdentifier&, drizzled::TableIdentifier&)
 
95
  {
 
96
    return EPERM;
 
97
  }
 
98
 
 
99
  int doCreateTable(drizzled::Session&,
 
100
                    drizzled::Table&,
 
101
                    drizzled::TableIdentifier&,
 
102
                    drizzled::message::Table&)
 
103
  {
 
104
    return EPERM;
 
105
  }
 
106
 
 
107
  int doDropTable(drizzled::Session&, drizzled::TableIdentifier&)
 
108
  {
 
109
    return 0;
96
110
  }
97
111
 
98
112
  const char **bas_ext() const 
99
113
  {
100
114
    return schema_exts;
101
115
  }
 
116
 
 
117
  void get_auto_increment(uint64_t, uint64_t,
 
118
                          uint64_t,
 
119
                          uint64_t *,
 
120
                          uint64_t *)
 
121
  {}
 
122
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
 
123
                             drizzled::SchemaIdentifier &schema_identifier,
 
124
                             drizzled::TableIdentifiers &set_of_identifiers);
102
125
};
103
126
 
104
127
#endif /* PLUGIN_SCHEMA_ENGINE_SCHEMA_H */