~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_engine/schema.h

  • Committer: Stewart Smith
  • Date: 2010-11-07 04:22:31 UTC
  • mto: (1911.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1912.
  • Revision ID: stewart@flamingspork.com-20101107042231-ola4sl7j0qvg58tz
fix ARCHIVE storage engine calling exit (lintian warning). Was because we were linking in libinternal into libazio, which links into archive plugin. Just link libinternal into the command line utilities.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
class Schema : public drizzled::plugin::StorageEngine
36
36
{
37
 
  bool writeSchemaFile(const drizzled::identifier::Schema &schema_identifier, const drizzled::message::Schema &db);
38
 
  bool readSchemaFile(const drizzled::identifier::Schema &schema_identifier, drizzled::message::Schema &schema);
39
 
  bool readSchemaFile(std::string filename, drizzled::message::Schema &schema);
 
37
  bool writeSchemaFile(const drizzled::SchemaIdentifier &schema_identifier, const drizzled::message::Schema &db);
 
38
  bool readSchemaFile(const drizzled::SchemaIdentifier &schema_identifier, drizzled::message::Schema &schema);
40
39
 
41
40
  void prime();
42
 
  void startup(drizzled::Session &session);
43
41
 
44
 
  typedef boost::unordered_map<std::string, drizzled::message::schema::shared_ptr> SchemaCache;
 
42
  typedef boost::unordered_map<std::string, drizzled::message::SchemaPtr> SchemaCache;
45
43
  SchemaCache schema_cache;
46
44
  bool schema_cache_filled;
47
45
 
53
51
  ~Schema();
54
52
 
55
53
 
 
54
  bool doCanCreateTable(const drizzled::TableIdentifier &identifier);
 
55
 
56
56
  drizzled::Cursor *create(drizzled::Table &)
57
57
  {
58
58
    return NULL;
59
59
  }
60
60
 
61
 
  void doGetSchemaIdentifiers(drizzled::identifier::Schema::vector &set_of_names);
62
 
  drizzled::message::schema::shared_ptr doGetSchemaDefinition(const drizzled::identifier::Schema&);
 
61
  void doGetSchemaIdentifiers(drizzled::SchemaIdentifiers &set_of_names);
 
62
  bool doGetSchemaDefinition(const drizzled::SchemaIdentifier&, drizzled::message::SchemaPtr &proto);
63
63
 
64
64
  bool doCreateSchema(const drizzled::message::Schema &schema_message);
65
65
 
66
66
  bool doAlterSchema(const drizzled::message::Schema &schema_message);
67
67
 
68
 
  bool doDropSchema(const drizzled::identifier::Schema&);
 
68
  bool doDropSchema(const drizzled::SchemaIdentifier&);
69
69
 
70
70
  // Below are table methods that we don't implement (and don't need)
71
71
 
72
72
  int doGetTableDefinition(drizzled::Session&,
73
 
                           const drizzled::identifier::Table&,
 
73
                           const drizzled::TableIdentifier&,
74
74
                           drizzled::message::Table&)
75
75
  {
76
76
    return ENOENT;
77
77
  }
78
78
 
79
 
  bool doDoesTableExist(drizzled::Session&, const drizzled::identifier::Table&)
 
79
  bool doDoesTableExist(drizzled::Session&, const drizzled::TableIdentifier&)
80
80
  {
81
81
    return false;
82
82
  }
83
83
 
84
 
  int doRenameTable(drizzled::Session&, const drizzled::identifier::Table&, const drizzled::identifier::Table&)
 
84
  int doRenameTable(drizzled::Session&, const drizzled::TableIdentifier&, const drizzled::TableIdentifier&)
85
85
  {
86
 
    return drizzled::HA_ERR_NO_SUCH_TABLE;
 
86
    return EPERM;
87
87
  }
88
88
 
89
89
  int doCreateTable(drizzled::Session&,
90
90
                    drizzled::Table&,
91
 
                    const drizzled::identifier::Table&,
 
91
                    const drizzled::TableIdentifier&,
92
92
                    drizzled::message::Table&)
93
93
  {
94
 
    return drizzled::ER_TABLE_PERMISSION_DENIED;
 
94
    return EPERM;
95
95
  }
96
96
 
97
 
  int doDropTable(drizzled::Session&, const drizzled::identifier::Table&)
 
97
  int doDropTable(drizzled::Session&, const drizzled::TableIdentifier&)
98
98
  {
99
 
    return drizzled::HA_ERR_NO_SUCH_TABLE;
 
99
    return 0;
100
100
  }
101
101
 
102
102
  const char **bas_ext() const 
109
109
                          uint64_t *,
110
110
                          uint64_t *)
111
111
  {}
112
 
 
113
112
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
114
 
                             const drizzled::identifier::Schema &schema_identifier,
115
 
                             drizzled::identifier::Table::vector &set_of_identifiers);
 
113
                             const drizzled::SchemaIdentifier &schema_identifier,
 
114
                             drizzled::TableIdentifiers &set_of_identifiers);
116
115
};
117
116
 
118
117
#endif /* PLUGIN_SCHEMA_ENGINE_SCHEMA_H */