mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
26 lines
510 B
C++
26 lines
510 B
C++
#include <Functions/FunctionFactory.h>
|
|
#include <Functions/FunctionStringToString.h>
|
|
#include <Functions/LowerUpperImpl.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
namespace
|
|
{
|
|
|
|
struct NameUpper
|
|
{
|
|
static constexpr auto name = "upper";
|
|
};
|
|
using FunctionUpper = FunctionStringToString<LowerUpperImpl<'a', 'z'>, NameUpper>;
|
|
|
|
}
|
|
|
|
REGISTER_FUNCTION(Upper)
|
|
{
|
|
factory.registerFunction<FunctionUpper>({}, FunctionFactory::CaseInsensitive);
|
|
factory.registerAlias("ucase", FunctionUpper::name, FunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|