dbms: made NameAndTypePair a struct (build is broken). [#METR-10202]

This commit is contained in:
Michael Kolupaev 2014-07-09 14:46:26 +04:00
parent 0041db77ab
commit d848cfec91

View File

@ -14,7 +14,22 @@ namespace DB
using Poco::SharedPtr;
typedef std::pair<std::string, DataTypePtr> NameAndTypePair;
struct NameAndTypePair
{
String name;
DataTypePtr type;
bool operator<(const NameAndTypePair & rhs) const
{
return std::make_pair(name, type->getName()) < std::make_pair(rhs.name, rhs.type->getName());
}
bool operator==(const NameAndTypePair & rhs) const
{
return name == rhs.name && type->getName() == rhs.type->getName();
}
};
typedef std::list<NameAndTypePair> NamesAndTypesList;
typedef SharedPtr<NamesAndTypesList> NamesAndTypesListPtr;
typedef std::vector<NameAndTypePair> NamesAndTypes;