2017-04-01 09:19:00 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/FunctionsDateTime.h>
|
2014-08-22 00:57:20 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
void registerFunctionsDateTime(FunctionFactory & factory)
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
factory.registerFunction<FunctionToYear>();
|
|
|
|
factory.registerFunction<FunctionToMonth>();
|
|
|
|
factory.registerFunction<FunctionToDayOfMonth>();
|
|
|
|
factory.registerFunction<FunctionToDayOfWeek>();
|
|
|
|
factory.registerFunction<FunctionToHour>();
|
|
|
|
factory.registerFunction<FunctionToMinute>();
|
|
|
|
factory.registerFunction<FunctionToSecond>();
|
|
|
|
factory.registerFunction<FunctionToStartOfDay>();
|
|
|
|
factory.registerFunction<FunctionToMonday>();
|
|
|
|
factory.registerFunction<FunctionToStartOfMonth>();
|
|
|
|
factory.registerFunction<FunctionToStartOfQuarter>();
|
|
|
|
factory.registerFunction<FunctionToStartOfYear>();
|
|
|
|
factory.registerFunction<FunctionToStartOfMinute>();
|
|
|
|
factory.registerFunction<FunctionToStartOfFiveMinute>();
|
|
|
|
factory.registerFunction<FunctionToStartOfHour>();
|
|
|
|
factory.registerFunction<FunctionToRelativeYearNum>();
|
|
|
|
factory.registerFunction<FunctionToRelativeMonthNum>();
|
|
|
|
factory.registerFunction<FunctionToRelativeWeekNum>();
|
|
|
|
factory.registerFunction<FunctionToRelativeDayNum>();
|
|
|
|
factory.registerFunction<FunctionToRelativeHourNum>();
|
|
|
|
factory.registerFunction<FunctionToRelativeMinuteNum>();
|
|
|
|
factory.registerFunction<FunctionToRelativeSecondNum>();
|
|
|
|
factory.registerFunction<FunctionToTime>();
|
|
|
|
factory.registerFunction<FunctionNow>();
|
|
|
|
factory.registerFunction<FunctionToday>();
|
|
|
|
factory.registerFunction<FunctionYesterday>();
|
|
|
|
factory.registerFunction<FunctionTimeSlot>();
|
|
|
|
factory.registerFunction<FunctionTimeSlots>();
|
2017-07-21 14:22:53 +00:00
|
|
|
factory.registerFunction<FunctionToYYYYMM>();
|
|
|
|
factory.registerFunction<FunctionToYYYYMMDD>();
|
|
|
|
factory.registerFunction<FunctionToYYYYMMDDhhmmss>();
|
2017-10-29 04:18:48 +00:00
|
|
|
factory.registerFunction<FunctionAddSeconds>();
|
|
|
|
factory.registerFunction<FunctionAddMinutes>();
|
|
|
|
factory.registerFunction<FunctionAddHours>();
|
|
|
|
factory.registerFunction<FunctionAddDays>();
|
|
|
|
factory.registerFunction<FunctionAddWeeks>();
|
|
|
|
factory.registerFunction<FunctionAddMonths>();
|
|
|
|
factory.registerFunction<FunctionAddYears>();
|
2014-08-22 00:57:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|