ClickHouse/src/Functions/hasSubsequenceUTF8.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
614 B
C++
Raw Normal View History

2023-07-06 19:43:37 +00:00
#include <Functions/FunctionFactory.h>
#include <Functions/HasSubsequenceImpl.h>
namespace DB
{
namespace
{
struct HasSubsequenceCaseSensitiveUTF8
{
2023-07-10 07:29:31 +00:00
static constexpr bool is_utf8 = true;
2023-07-10 09:18:09 +00:00
static int toLowerIfNeed(int code_point) { return code_point; }
2023-07-06 19:43:37 +00:00
};
struct NameHasSubsequenceUTF8
{
static constexpr auto name = "hasSubsequenceUTF8";
};
2023-07-10 09:18:09 +00:00
using FunctionHasSubsequenceUTF8 = HasSubsequenceImpl<NameHasSubsequenceUTF8, HasSubsequenceCaseSensitiveUTF8>;
2023-07-06 19:43:37 +00:00
}
REGISTER_FUNCTION(hasSubsequenceUTF8)
{
factory.registerFunction<FunctionHasSubsequenceUTF8>({}, FunctionFactory::CaseInsensitive);
}
}