~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/identifier/constants/schema.cc

  • Committer: Mark Atwood
  • Date: 2011-10-08 04:50:51 UTC
  • mfrom: (2430.1.1 rf)
  • Revision ID: me@mark.atwood.name-20111008045051-6ha1qiy7k2a9c3jv
Tags: 2011.10.27
mergeĀ lp:~olafvdspek/drizzle/refactor2

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
#include <config.h>
 
22
 
22
23
#include <drizzled/identifier.h>
23
24
 
24
25
namespace drizzled {
29
30
class Schema : public identifier::Schema
30
31
{
31
32
public:
32
 
  Schema(const char* name) :
33
 
    identifier::Schema(str_ref(name)),
34
 
    path_(boost::to_lower_copy(getSchemaName()))
35
 
  {
36
 
  }
37
 
 
38
 
  const std::string& getPath() const
39
 
  {
40
 
    return path_;
41
 
  }
42
 
 
43
 
  bool isSystem() const
 
33
  Schema(const std::string &name) :
 
34
    identifier::Schema(name)
 
35
  {
 
36
    _path= boost::to_lower_copy(name);
 
37
  }
 
38
 
 
39
  const std::string &getPath() const
 
40
  {
 
41
    return _path;
 
42
  }
 
43
 
 
44
  inline bool isSystem() const
44
45
  {
45
46
    return true;
46
47
  }
47
48
 
48
49
private:
49
 
  std::string path_;
 
50
  std::string _path;
50
51
};
51
52
 
52
53
} /* namespace constants */
53
54
 
54
 
static constants::Schema g_dd= "DATA_DICTIONARY";
55
 
static constants::Schema g_is= "INFORMATION_SCHEMA";
 
55
const identifier::Schema& data_dictionary()
 
56
{
 
57
  static drizzled::identifier::Schema _tmp("DATA_DICTIONARY");
56
58
 
57
 
const Schema& data_dictionary()
58
 
{
59
 
  return g_dd;
 
59
  return _tmp;
60
60
}
61
61
 
62
 
const Schema& information_schema()
 
62
const identifier::Schema& information_schema()
63
63
{
64
 
  return g_is;
 
64
  static drizzled::identifier::Schema _tmp("INFORMATION_SCHEMA");
 
65
 
 
66
  return _tmp;
65
67
}
66
68
 
67
69
} /* namespace identifier */