ClickHouse/src/Functions/snowflake.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1.2 KiB
C++
Raw Normal View History

2021-08-18 16:47:40 +00:00
#include <Functions/FunctionSnowflake.h>
#include <Functions/FunctionFactory.h>
namespace DB
{
REGISTER_FUNCTION(DateTimeToSnowflake)
2021-08-18 16:47:40 +00:00
{
factory.registerFunction("dateTimeToSnowflake",
[](ContextPtr){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
std::make_shared<FunctionDateTimeToSnowflake>("dateTimeToSnowflake")); });
}
REGISTER_FUNCTION(DateTime64ToSnowflake)
2021-08-18 16:47:40 +00:00
{
factory.registerFunction("dateTime64ToSnowflake",
[](ContextPtr){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
std::make_shared<FunctionDateTime64ToSnowflake>("dateTime64ToSnowflake")); });
}
REGISTER_FUNCTION(SnowflakeToDateTime)
2021-08-18 16:47:40 +00:00
{
factory.registerFunction("snowflakeToDateTime",
2023-06-11 07:40:39 +00:00
[](ContextPtr context){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
std::make_shared<FunctionSnowflakeToDateTime>("snowflakeToDateTime", context)); });
2021-08-18 16:47:40 +00:00
}
REGISTER_FUNCTION(SnowflakeToDateTime64)
2021-08-18 16:47:40 +00:00
{
factory.registerFunction("snowflakeToDateTime64",
[](ContextPtr context){ return std::make_unique<FunctionToOverloadResolverAdaptor>(
std::make_shared<FunctionSnowflakeToDateTime64>("snowflakeToDateTime64", context)); });
2021-08-18 16:47:40 +00:00
}
}