mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 01:12:12 +00:00
22 lines
597 B
C++
22 lines
597 B
C++
#include <Functions/FunctionFactory.h>
|
|
#include <Functions/DateTimeTransforms.h>
|
|
#include <Functions/FunctionDateOrDateTimeToSomething.h>
|
|
#include <DataTypes/DataTypesNumber.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
using FunctionToDayOfMonth = FunctionDateOrDateTimeToSomething<DataTypeUInt8, ToDayOfMonthImpl>;
|
|
|
|
REGISTER_FUNCTION(ToDayOfMonth)
|
|
{
|
|
factory.registerFunction<FunctionToDayOfMonth>();
|
|
|
|
/// MysQL compatibility alias.
|
|
factory.registerAlias("DAY", "toDayOfMonth", FunctionFactory::CaseInsensitive);
|
|
factory.registerAlias("DAYOFMONTH", "toDayOfMonth", FunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|