~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/identifier/schema.h

  • Committer: Brian Aker
  • Date: 2010-12-16 04:01:22 UTC
  • mfrom: (1996.2.1 compare)
  • Revision ID: brian@tangent.org-20101216040122-eodh5shwsij35ybe
Merge in uuid tree.

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
 
 
61
  // @note this should be changed to protected once Session contains an
 
62
  // identifier for current db.
 
63
public:
 
64
 
60
65
public:
61
66
  typedef std::vector <SchemaIdentifier> vector;
62
 
  typedef const SchemaIdentifier& const_reference;
63
67
 
64
68
  SchemaIdentifier(const std::string &db_arg);
65
69
 
79
83
    return catalog;
80
84
  }
81
85
 
82
 
  virtual bool isValid() const;
83
 
 
 
86
  bool isValid() const;
84
87
  bool compare(const std::string &arg) const;
85
 
  bool compare(SchemaIdentifier::const_reference) const;
86
88
 
87
 
  friend bool operator<(SchemaIdentifier::const_reference left, SchemaIdentifier::const_reference right)
 
89
  friend bool operator<(const SchemaIdentifier &left, const SchemaIdentifier &right)
88
90
  {
89
91
    return  boost::algorithm::to_upper_copy(left.getSchemaName()) < boost::algorithm::to_upper_copy(right.getSchemaName());
90
92
  }
91
93
 
92
94
  friend std::ostream& operator<<(std::ostream& output,
93
 
                                  SchemaIdentifier::const_reference identifier)
 
95
                                  SchemaIdentifier &identifier)
94
96
  {
95
97
    output << "SchemaIdentifier:(";
96
98
    output <<  identifier.catalog;
103
105
    return output;  // for multiple << operators.
104
106
  }
105
107
 
106
 
  friend bool operator==(SchemaIdentifier::const_reference left,
107
 
                         SchemaIdentifier::const_reference right)
 
108
  friend bool operator==(const SchemaIdentifier &left,
 
109
                         const SchemaIdentifier &right)
108
110
  {
109
111
    return boost::iequals(left.getSchemaName(), right.getSchemaName());
110
112
  }
 
113
 
111
114
};
112
115
 
113
116