~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/identifier/schema.h

  • Committer: Andrew Hutchings
  • Date: 2010-11-09 13:38:01 UTC
  • mto: (1919.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 1920.
  • Revision ID: andrew@linuxjedi.co.uk-20101109133801-byjzsao76346395x
Add FLUSH GLOBAL STATUS; command
Clears the global status variables for the server

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
  std::string db_path;
58
58
  std::string catalog;
59
59
 
60
 
public:
61
 
  typedef std::vector <SchemaIdentifier> vector;
62
 
  typedef const SchemaIdentifier& const_reference;
63
 
 
 
60
 
 
61
  // @note this should be changed to protected once Session contains an
 
62
  // identifier for current db.
 
63
public:
 
64
 
 
65
public:
64
66
  SchemaIdentifier(const std::string &db_arg);
65
67
 
66
68
  virtual ~SchemaIdentifier()
67
69
  { }
68
70
 
69
 
  virtual void getSQLPath(std::string &arg) const;
 
71
  virtual const std::string &getSQLPath();
70
72
  const std::string &getPath() const;
71
73
 
72
74
  const std::string &getSchemaName() const
79
81
    return catalog;
80
82
  }
81
83
 
82
 
  virtual bool isValid() const;
83
 
 
 
84
  bool isValid() const;
84
85
  bool compare(const std::string &arg) const;
85
 
  bool compare(SchemaIdentifier::const_reference) const;
86
86
 
87
 
  friend bool operator<(SchemaIdentifier::const_reference left, SchemaIdentifier::const_reference right)
 
87
  friend bool operator<(const SchemaIdentifier &left, const SchemaIdentifier &right)
88
88
  {
89
89
    return  boost::algorithm::to_upper_copy(left.getSchemaName()) < boost::algorithm::to_upper_copy(right.getSchemaName());
90
90
  }
91
91
 
92
92
  friend std::ostream& operator<<(std::ostream& output,
93
 
                                  SchemaIdentifier::const_reference identifier)
 
93
                                  SchemaIdentifier &identifier)
94
94
  {
95
95
    output << "SchemaIdentifier:(";
96
96
    output <<  identifier.catalog;
103
103
    return output;  // for multiple << operators.
104
104
  }
105
105
 
106
 
  friend bool operator==(SchemaIdentifier::const_reference left,
107
 
                         SchemaIdentifier::const_reference right)
 
106
  friend bool operator==(const SchemaIdentifier &left,
 
107
                         const SchemaIdentifier &right)
108
108
  {
109
109
    return boost::iequals(left.getSchemaName(), right.getSchemaName());
110
110
  }
 
111
 
111
112
};
112
113
 
 
114
typedef std::vector <SchemaIdentifier> SchemaIdentifiers;
113
115
 
114
116
} /* namespace drizzled */
115
117