mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +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);
|
|
}
|
|
|
|
}
|