~dshrews/drizzle/bug686781

« back to all changes in this revision

Viewing changes to drizzled/identifier/schema.h

  • Committer: David Shrewsbury
  • Date: 2011-01-11 20:37:44 UTC
  • mfrom: (2069.2.4 drizzle)
  • Revision ID: shrewsbury.dave@gmail.com-20110111203744-v68giog560ejzyw7
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include <drizzled/enum.h>
36
36
#include "drizzled/definitions.h"
37
37
#include "drizzled/message/table.pb.h"
 
38
#include "drizzled/catalog/local.h"
38
39
#include <string.h>
39
40
 
40
41
#include <assert.h>
49
50
 
50
51
namespace drizzled {
51
52
 
52
 
static std::string catalog("local");
53
 
 
54
53
class SchemaIdentifier : public Identifier
55
54
{
56
55
  std::string db;
57
56
  std::string db_path;
58
 
  std::string catalog;
59
57
 
60
58
public:
61
59
  typedef std::vector <SchemaIdentifier> vector;
75
73
    return db;
76
74
  }
77
75
 
78
 
  const std::string &getCatalogName() const
79
 
  {
80
 
    return catalog;
81
 
  }
 
76
  const std::string &getCatalogName() const;
82
77
 
83
78
  virtual bool isValid() const;
84
79
 
90
85
    return  boost::algorithm::to_upper_copy(left.getSchemaName()) < boost::algorithm::to_upper_copy(right.getSchemaName());
91
86
  }
92
87
 
93
 
  friend std::ostream& operator<<(std::ostream& output,
94
 
                                  SchemaIdentifier::const_reference identifier)
95
 
  {
96
 
    output << "SchemaIdentifier:(";
97
 
    output <<  identifier.catalog;
98
 
    output << ", ";
99
 
    output <<  identifier.db;
100
 
    output << ", ";
101
 
    output << identifier.getPath();
102
 
    output << ")";
103
 
 
104
 
    return output;  // for multiple << operators.
105
 
  }
106
 
 
107
88
  friend bool operator==(SchemaIdentifier::const_reference left,
108
89
                         SchemaIdentifier::const_reference right)
109
90
  {
111
92
  }
112
93
};
113
94
 
 
95
std::ostream& operator<<(std::ostream& output, const SchemaIdentifier &identifier);
 
96
 
114
97
 
115
98
} /* namespace drizzled */
116
99