ClickHouse/src/Functions/hasSubsequence.cpp

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

31 lines
575 B
C++
Raw Normal View History

2023-07-06 13:16:31 +00:00
#include <Functions/FunctionFactory.h>
#include <Functions/HasSubsequenceImpl.h>
namespace DB
{
namespace
{
struct HasSubsequenceCaseSensitiveASCII
{
2023-07-10 07:29:31 +00:00
static constexpr bool is_utf8 = false;
2023-07-10 09:18:09 +00:00
static int toLowerIfNeed(int c) { return c; }
2023-07-06 13:16:31 +00:00
};
struct NameHasSubsequence
{
static constexpr auto name = "hasSubsequence";
};
2023-07-10 09:18:09 +00:00
using FunctionHasSubsequence = HasSubsequenceImpl<NameHasSubsequence, HasSubsequenceCaseSensitiveASCII>;
2023-07-06 13:16:31 +00:00
}
REGISTER_FUNCTION(hasSubsequence)
{
factory.registerFunction<FunctionHasSubsequence>({}, FunctionFactory::CaseInsensitive);
}
}