~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/schema_identifier.h

  • Committer: Brian Aker
  • Date: 2010-03-31 17:54:16 UTC
  • mfrom: (1418.1.4 build)
  • Revision ID: brian@gaz-20100331175416-812yvobnklh7qc4x
Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 
65
65
public:
66
66
  SchemaIdentifier(const std::string &db_arg) :
67
 
    db(db_arg)
 
67
    db(db_arg),
 
68
    lower_db(db_arg)
68
69
  { 
69
 
    lower_db.append(db_arg);
70
 
 
71
70
    std::transform(lower_db.begin(), lower_db.end(),
72
71
                   lower_db.begin(), ::tolower);
73
72
  }
84
83
  }
85
84
 
86
85
  bool isValid();
87
 
  bool compare(std::string arg);
 
86
  bool compare(std::string arg) const;
88
87
 
89
 
  friend bool operator<(SchemaIdentifier &left, SchemaIdentifier &right)
 
88
  friend bool operator<(const SchemaIdentifier &left, const SchemaIdentifier &right)
90
89
  {
91
90
    return left.lower_db < right.lower_db;
92
91
  }
93
92
 
94
 
  friend std::ostream& operator<<(std::ostream& output, SchemaIdentifier &identifier)
 
93
  friend std::ostream& operator<<(std::ostream& output,
 
94
                                  SchemaIdentifier &identifier)
95
95
  {
96
96
    output << "SchemaIdentifier:(";
97
97
    output <<  identifier.db;
102
102
    return output;  // for multiple << operators.
103
103
  }
104
104
 
105
 
  friend bool operator==(SchemaIdentifier &left, SchemaIdentifier &right)
 
105
  friend bool operator==(const SchemaIdentifier &left,
 
106
                         const SchemaIdentifier &right)
106
107
  {
107
108
    if (left.lower_db == right.lower_db)
108
109
    {