mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 03:52:15 +00:00
24 lines
569 B
C++
24 lines
569 B
C++
#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);
|
|
}
|
|
|
|
}
|