mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
22 lines
715 B
C++
22 lines
715 B
C++
#include <DataTypes/Serializations/SerializationBool.h>
|
|
#include <DataTypes/DataTypeFactory.h>
|
|
#include <DataTypes/DataTypeCustom.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
void registerDataTypeDomainBool(DataTypeFactory & factory)
|
|
{
|
|
factory.registerSimpleDataTypeCustom("Bool", []
|
|
{
|
|
auto type = DataTypeFactory::instance().get("UInt8");
|
|
return std::make_pair(type, std::make_unique<DataTypeCustomDesc>(
|
|
std::make_unique<DataTypeCustomFixedName>("Bool"), std::make_unique<SerializationBool>(type->getDefaultSerialization())));
|
|
});
|
|
|
|
factory.registerAlias("bool", "Bool", DataTypeFactory::CaseInsensitive);
|
|
factory.registerAlias("boolean", "Bool", DataTypeFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|