ClickHouse/src/Functions/upper.cpp

26 lines
535 B
C++
Raw Normal View History

2018-09-09 23:36:06 +00:00
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionStringToString.h>
#include <Functions/LowerUpperImpl.h>
namespace DB
{
2020-09-07 18:00:37 +00:00
namespace
{
2018-09-09 23:36:06 +00:00
struct NameUpper
{
static constexpr auto name = "upper";
};
using FunctionUpper = FunctionStringToString<LowerUpperImpl<'a', 'z'>, NameUpper>;
2020-09-07 18:00:37 +00:00
}
2018-09-09 23:36:06 +00:00
void registerFunctionUpper(FunctionFactory & factory)
{
factory.registerFunction<FunctionUpper>(FunctionFactory::CaseInsensitive);
2018-12-06 13:22:57 +00:00
factory.registerAlias("ucase", FunctionUpper::name, FunctionFactory::CaseInsensitive);
2018-09-09 23:36:06 +00:00
}
}