blob: c93bbead58c5c49be6e87259490298d557c51559 (
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
|
#include <Functions/FunctionFactory.h>
#include <Functions/HasSubsequenceImpl.h>
namespace DB
{
namespace
{
struct HasSubsequenceCaseInsensitiveASCII
{
static constexpr bool is_utf8 = false;
static int toLowerIfNeed(int c) { return std::tolower(c); }
};
struct NameHasSubsequenceCaseInsensitive
{
static constexpr auto name = "hasSubsequenceCaseInsensitive";
};
using FunctionHasSubsequenceCaseInsensitive = HasSubsequenceImpl<NameHasSubsequenceCaseInsensitive, HasSubsequenceCaseInsensitiveASCII>;
}
REGISTER_FUNCTION(hasSubsequenceCaseInsensitive)
{
factory.registerFunction<FunctionHasSubsequenceCaseInsensitive>({}, FunctionFactory::CaseInsensitive);
}
}
|