~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_engine/schema.h

  • Committer: Monty Taylor
  • Date: 2010-08-20 20:54:13 UTC
  • mto: (1728.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1729.
  • Revision ID: mordred@inaugust.com-20100820205413-2zebseruww4uq3dg
Removed a HASH in xa_resource_manager. It's not actually used, but I left it
in case someone did actually want to implement RECOVER some day.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <assert.h>
25
25
#include <drizzled/plugin/storage_engine.h>
 
26
#include <drizzled/data_home.h>
26
27
#include <boost/unordered_map.hpp>
27
 
#include <boost/thread/shared_mutex.hpp>
 
28
 
 
29
#include <pthread.h>
28
30
 
29
31
extern const drizzled::CHARSET_INFO *default_charset_info;
30
32
 
35
37
class Schema : public drizzled::plugin::StorageEngine
36
38
{
37
39
  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
  bool readSchemaFile(const std::string &schema_file_name, drizzled::message::Schema &schema);
39
41
 
40
42
  void prime();
41
43
 
42
 
  typedef boost::unordered_map<std::string, drizzled::message::schema::shared_ptr> SchemaCache;
 
44
  typedef boost::unordered_map<std::string, drizzled::message::Schema> SchemaCache;
43
45
  SchemaCache schema_cache;
44
46
  bool schema_cache_filled;
45
47
 
46
 
  boost::shared_mutex mutex;
 
48
  pthread_rwlock_t schema_lock;
47
49
 
48
50
public:
49
51
  Schema();
51
53
  ~Schema();
52
54
 
53
55
 
54
 
  drizzled::Cursor *create(drizzled::Table &)
 
56
  bool doCanCreateTable(const drizzled::TableIdentifier &identifier);
 
57
 
 
58
  drizzled::Cursor *create(drizzled::TableShare &)
55
59
  {
56
60
    return NULL;
57
61
  }
58
62
 
59
 
  void doGetSchemaIdentifiers(drizzled::SchemaIdentifier::vector &set_of_names);
60
 
  bool doGetSchemaDefinition(const drizzled::SchemaIdentifier&, drizzled::message::schema::shared_ptr &proto);
 
63
  void doGetSchemaIdentifiers(drizzled::SchemaIdentifiers &set_of_names);
 
64
  bool doGetSchemaDefinition(const drizzled::SchemaIdentifier&, drizzled::message::Schema &proto);
61
65
 
62
66
  bool doCreateSchema(const drizzled::message::Schema &schema_message);
63
67
 
74
78
    return ENOENT;
75
79
  }
76
80
 
 
81
 
 
82
  void doGetTableNames(drizzled::CachedDirectory&,
 
83
                       const drizzled::SchemaIdentifier&,
 
84
                       std::set<std::string>&)
 
85
  {
 
86
  }
 
87
 
77
88
  bool doDoesTableExist(drizzled::Session&, const drizzled::TableIdentifier&)
78
89
  {
79
90
    return false;
109
120
  {}
110
121
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
111
122
                             const drizzled::SchemaIdentifier &schema_identifier,
112
 
                             drizzled::TableIdentifier::vector &set_of_identifiers);
 
123
                             drizzled::TableIdentifiers &set_of_identifiers);
113
124
};
114
125
 
115
126
#endif /* PLUGIN_SCHEMA_ENGINE_SCHEMA_H */