blob: 18438bc8b16a91bc9d8ca9babe9dab9aa8df1bd3 (
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
27
28
29
30
31
|
#include <Functions/FunctionFactory.h>
#include <Functions/HasSubsequenceImpl.h>
#include "Poco/Unicode.h"
namespace DB
{
namespace
{
struct HasSubsequenceCaseInsensitiveUTF8
{
static constexpr bool is_utf8 = true;
static int toLowerIfNeed(int code_point) { return Poco::Unicode::toLower(code_point); }
};
struct NameHasSubsequenceCaseInsensitiveUTF8
{
static constexpr auto name = "hasSubsequenceCaseInsensitiveUTF8";
};
using FunctionHasSubsequenceCaseInsensitiveUTF8 = HasSubsequenceImpl<NameHasSubsequenceCaseInsensitiveUTF8, HasSubsequenceCaseInsensitiveUTF8>;
}
REGISTER_FUNCTION(hasSubsequenceCaseInsensitiveUTF8)
{
factory.registerFunction<FunctionHasSubsequenceCaseInsensitiveUTF8>({}, FunctionFactory::CaseInsensitive);
}
}
|