blob: 38ae5a8a7f063a5c92c31cd99a19dad2b0f8cbe7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#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);
}
}
|