ClickHouse/dbms/src/Functions/lower.cpp

23 lines
546 B
C++
Raw Normal View History

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 NameLower
{
static constexpr auto name = "lower";
};
using FunctionLower = FunctionStringToString<LowerUpperImpl<'A', 'Z'>, NameLower>;
void registerFunctionLower(FunctionFactory & factory)
{
factory.registerFunction<FunctionLower>(FunctionFactory::CaseInsensitive);
factory.registerAlias("lcase", "lower", FunctionFactory::CaseInsensitive);
2018-09-09 23:36:06 +00:00
}
}