1 | #include <DataTypes/DataTypeString.h> |
---|---|
2 | #include <Functions/FunctionFactory.h> |
3 | #include <Functions/FunctionStringToString.h> |
4 | #include <Functions/LowerUpperImpl.h> |
5 | |
6 | |
7 | namespace DB |
8 | { |
9 | |
10 | struct NameUpper |
11 | { |
12 | static constexpr auto name = "upper"; |
13 | }; |
14 | using FunctionUpper = FunctionStringToString<LowerUpperImpl<'a', 'z'>, NameUpper>; |
15 | |
16 | void registerFunctionUpper(FunctionFactory & factory) |
17 | { |
18 | factory.registerFunction<FunctionUpper>(FunctionFactory::CaseInsensitive); |
19 | factory.registerAlias("ucase", FunctionUpper::name, FunctionFactory::CaseInsensitive); |
20 | } |
21 | |
22 | } |
23 |