mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
4088c0a7f3
Automated register all functions with below naming convention by iterating through the symbols: void DB::registerXXX(DB::FunctionFactory &)
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
#include <Functions/FunctionSnowflake.h>
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
REGISTER_FUNCTION(DateTimeToSnowflake)
|
|
{
|
|
factory.registerFunction("dateTimeToSnowflake",
|
|
[](ContextPtr){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
|
|
std::make_shared<FunctionDateTimeToSnowflake>("dateTimeToSnowflake")); });
|
|
}
|
|
|
|
REGISTER_FUNCTION(DateTime64ToSnowflake)
|
|
{
|
|
factory.registerFunction("dateTime64ToSnowflake",
|
|
[](ContextPtr){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
|
|
std::make_shared<FunctionDateTime64ToSnowflake>("dateTime64ToSnowflake")); });
|
|
}
|
|
|
|
REGISTER_FUNCTION(SnowflakeToDateTime)
|
|
{
|
|
factory.registerFunction("snowflakeToDateTime",
|
|
[](ContextPtr){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
|
|
std::make_shared<FunctionSnowflakeToDateTime>("snowflakeToDateTime")); });
|
|
}
|
|
REGISTER_FUNCTION(SnowflakeToDateTime64)
|
|
{
|
|
factory.registerFunction("snowflakeToDateTime64",
|
|
[](ContextPtr){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
|
|
std::make_shared<FunctionSnowflakeToDateTime64>("snowflakeToDateTime64")); });
|
|
}
|
|
|
|
}
|