~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/identifier/schema.h

  • Committer: Brian Aker
  • Date: 2011-01-17 23:44:48 UTC
  • mfrom: (2088.1.5 drizzle-build)
  • Revision ID: brian@tangent.org-20110117234448-0tt6rd6fxa3csdaf
Rollup of all changes for identifier/error

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#include <boost/algorithm/string.hpp>
50
50
 
51
51
namespace drizzled {
 
52
namespace identifier {
52
53
 
53
 
class SchemaIdentifier : public Identifier
 
54
class Schema : public Identifier
54
55
{
55
56
  std::string db;
56
57
  std::string db_path;
57
58
 
58
59
public:
59
 
  typedef std::vector <SchemaIdentifier> vector;
60
 
  typedef const SchemaIdentifier& const_reference;
61
 
 
62
 
  SchemaIdentifier(const std::string &db_arg);
63
 
 
64
 
  virtual ~SchemaIdentifier()
 
60
  typedef std::vector <Schema> vector;
 
61
  typedef const Schema& const_reference;
 
62
 
 
63
  Schema(const std::string &db_arg);
 
64
 
 
65
  virtual ~Schema()
65
66
  { }
66
67
 
67
68
  virtual void getSQLPath(std::string &arg) const;
78
79
  virtual bool isValid() const;
79
80
 
80
81
  bool compare(const std::string &arg) const;
81
 
  bool compare(SchemaIdentifier::const_reference) const;
 
82
  bool compare(Schema::const_reference) const;
82
83
 
83
 
  friend bool operator<(SchemaIdentifier::const_reference left, SchemaIdentifier::const_reference right)
 
84
  friend bool operator<(Schema::const_reference left, Schema::const_reference right)
84
85
  {
85
86
    return  boost::algorithm::to_upper_copy(left.getSchemaName()) < boost::algorithm::to_upper_copy(right.getSchemaName());
86
87
  }
87
88
 
88
 
  friend bool operator==(SchemaIdentifier::const_reference left,
89
 
                         SchemaIdentifier::const_reference right)
 
89
  friend bool operator==(Schema::const_reference left,
 
90
                         Schema::const_reference right)
90
91
  {
91
92
    return boost::iequals(left.getSchemaName(), right.getSchemaName());
92
93
  }
93
94
};
94
95
 
95
 
std::ostream& operator<<(std::ostream& output, const SchemaIdentifier &identifier);
96
 
 
97
 
 
 
96
std::ostream& operator<<(std::ostream& output, const Schema&identifier);
 
97
 
 
98
 
 
99
} /* namespace identifier */
98
100
} /* namespace drizzled */
99
101
 
100
102
#endif /* DRIZZLED_IDENTIFIER_SCHEMA_H */