ClickHouse/src/DataTypes/DataTypeDate.cpp

24 lines
569 B
C++
Raw Normal View History

2021-03-09 14:10:28 +00:00
#include <DataTypes/DataTypeDate.h>
#include <DataTypes/Serializations/SerializationDate.h>
#include <DataTypes/DataTypeFactory.h>
namespace DB
{
bool DataTypeDate::equals(const IDataType & rhs) const
{
return typeid(rhs) == typeid(*this);
}
SerializationPtr DataTypeDate::doGetDefaultSerialization() const
{
return std::make_shared<SerializationDate>();
}
void registerDataTypeDate(DataTypeFactory & factory)
{
factory.registerSimpleDataType("Date", [] { return DataTypePtr(std::make_shared<DataTypeDate>()); }, DataTypeFactory::CaseInsensitive);
}
}