2022-02-07 20:38:36 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/DateTimeTransforms.h>
|
2022-08-17 16:38:06 +00:00
|
|
|
#include <Functions/FunctionDateOrDateTimeToDateOrDate32.h>
|
2022-02-07 20:38:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2022-08-17 16:38:06 +00:00
|
|
|
using FunctionToLastDayOfMonth = FunctionDateOrDateTimeToDateOrDate32<ToLastDayOfMonthImpl>;
|
2022-02-07 20:38:36 +00:00
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(ToLastDayOfMonth)
|
2022-02-07 20:38:36 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionToLastDayOfMonth>();
|
|
|
|
|
2022-03-10 19:30:46 +00:00
|
|
|
/// MySQL compatibility alias.
|
2022-08-27 21:53:51 +00:00
|
|
|
factory.registerAlias("LAST_DAY", "toLastDayOfMonth", FunctionFactory::CaseInsensitive);
|
2022-02-07 20:38:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|