ClickHouse/src/Functions/upper.cpp
2020-09-07 21:00:37 +03:00

26 lines
535 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>;
}
void registerFunctionUpper(FunctionFactory & factory)
{
factory.registerFunction<FunctionUpper>(FunctionFactory::CaseInsensitive);
factory.registerAlias("ucase", FunctionUpper::name, FunctionFactory::CaseInsensitive);
}
}