2018-09-09 23:36:06 +00:00
|
|
|
#include <DataTypes/DataTypeString.h>
|
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/FunctionStringToString.h>
|
|
|
|
#include <Functions/LowerUpperImpl.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
struct NameUpper
|
|
|
|
{
|
|
|
|
static constexpr auto name = "upper";
|
|
|
|
};
|
|
|
|
using FunctionUpper = FunctionStringToString<LowerUpperImpl<'a', 'z'>, NameUpper>;
|
|
|
|
|
|
|
|
void registerFunctionUpper(FunctionFactory & factory)
|
|
|
|
{
|
2018-12-05 16:59:35 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
}
|