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
|
|
|
|
{
|
2020-09-07 18:00:37 +00:00
|
|
|
namespace
|
|
|
|
{
|
2018-09-09 23:36:06 +00:00
|
|
|
|
|
|
|
struct NameLower
|
|
|
|
{
|
|
|
|
static constexpr auto name = "lower";
|
|
|
|
};
|
|
|
|
using FunctionLower = FunctionStringToString<LowerUpperImpl<'A', 'Z'>, NameLower>;
|
|
|
|
|
2020-09-07 18:00:37 +00:00
|
|
|
}
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(Lower)
|
2018-09-09 23:36:06 +00:00
|
|
|
{
|
2018-12-05 16:59:35 +00:00
|
|
|
factory.registerFunction<FunctionLower>(FunctionFactory::CaseInsensitive);
|
2018-12-06 13:22:57 +00:00
|
|
|
factory.registerAlias("lcase", NameLower::name, FunctionFactory::CaseInsensitive);
|
2018-09-09 23:36:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|