2022-02-07 20:38:36 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/DateTimeTransforms.h>
|
|
|
|
#include <Functions/FunctionDateOrDateTimeToSomething.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
using FunctionToLastDayOfMonth = FunctionDateOrDateTimeToSomething<DataTypeDate, ToLastDayOfMonthImpl>;
|
|
|
|
|
|
|
|
void registerFunctionToLastDayOfMonth(FunctionFactory & factory)
|
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionToLastDayOfMonth>();
|
|
|
|
|
2022-03-10 19:30:46 +00:00
|
|
|
/// MySQL compatibility alias.
|
2022-02-07 20:38:36 +00:00
|
|
|
factory.registerFunction<FunctionToLastDayOfMonth>("LAST_DAY", FunctionFactory::CaseInsensitive);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|