2011-10-31 17:55:06 +00:00
|
|
|
#pragma once
|
2010-03-18 19:32:14 +00:00
|
|
|
|
|
|
|
#include <map>
|
2012-09-05 19:51:09 +00:00
|
|
|
#include <list>
|
2010-03-18 19:32:14 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <Poco/SharedPtr.h>
|
|
|
|
|
|
|
|
#include <DB/DataTypes/IDataType.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
using Poco::SharedPtr;
|
|
|
|
|
2014-07-09 10:46:26 +00:00
|
|
|
struct NameAndTypePair
|
|
|
|
{
|
|
|
|
String name;
|
|
|
|
DataTypePtr type;
|
|
|
|
|
2014-07-09 11:45:51 +00:00
|
|
|
NameAndTypePair() {}
|
|
|
|
NameAndTypePair(const String & name_, const DataTypePtr & type_) : name(name_), type(type_) {}
|
|
|
|
|
2014-07-09 10:46:26 +00:00
|
|
|
bool operator<(const NameAndTypePair & rhs) const
|
|
|
|
{
|
2014-07-10 07:53:33 +00:00
|
|
|
return std::tie(name, type->getName()) < std::tie(rhs.name, rhs.type->getName());
|
2014-07-09 10:46:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool operator==(const NameAndTypePair & rhs) const
|
|
|
|
{
|
|
|
|
return name == rhs.name && type->getName() == rhs.type->getName();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-11-01 17:12:11 +00:00
|
|
|
typedef std::list<NameAndTypePair> NamesAndTypesList;
|
|
|
|
typedef SharedPtr<NamesAndTypesList> NamesAndTypesListPtr;
|
2013-05-08 09:52:02 +00:00
|
|
|
typedef std::vector<NameAndTypePair> NamesAndTypes;
|
2011-11-01 17:12:11 +00:00
|
|
|
|
2010-03-18 19:32:14 +00:00
|
|
|
}
|