mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
27 lines
544 B
C++
27 lines
544 B
C++
#include <DataTypes/DataTypeString.h>
|
|
#include <Functions/FunctionFactory.h>
|
|
#include <Functions/FunctionStringToString.h>
|
|
#include <Functions/LowerUpperImpl.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
namespace
|
|
{
|
|
|
|
struct NameLower
|
|
{
|
|
static constexpr auto name = "lower";
|
|
};
|
|
using FunctionLower = FunctionStringToString<LowerUpperImpl<'A', 'Z'>, NameLower>;
|
|
|
|
}
|
|
|
|
REGISTER_FUNCTION(Lower)
|
|
{
|
|
factory.registerFunction<FunctionLower>({}, FunctionFactory::CaseInsensitive);
|
|
factory.registerAlias("lcase", NameLower::name, FunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|