mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 01:12:12 +00:00
31 lines
575 B
C++
31 lines
575 B
C++
#include <Functions/FunctionFactory.h>
|
|
#include <Functions/HasSubsequenceImpl.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
namespace
|
|
{
|
|
|
|
struct HasSubsequenceCaseSensitiveASCII
|
|
{
|
|
static constexpr bool is_utf8 = false;
|
|
|
|
static int toLowerIfNeed(int c) { return c; }
|
|
};
|
|
|
|
struct NameHasSubsequence
|
|
{
|
|
static constexpr auto name = "hasSubsequence";
|
|
};
|
|
|
|
using FunctionHasSubsequence = HasSubsequenceImpl<NameHasSubsequence, HasSubsequenceCaseSensitiveASCII>;
|
|
}
|
|
|
|
REGISTER_FUNCTION(hasSubsequence)
|
|
{
|
|
factory.registerFunction<FunctionHasSubsequence>({}, FunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|