ClickHouse/src/Functions/match.cpp

27 lines
517 B
C++
Raw Normal View History

#include "FunctionsStringSearch.h"
#include "FunctionFactory.h"
#include "MatchImpl.h"
namespace DB
{
2020-09-07 18:00:37 +00:00
namespace
{
struct NameMatch
{
static constexpr auto name = "match";
};
using FunctionMatch = FunctionsStringSearch<MatchImpl<NameMatch, MatchTraits::Syntax::Re2, MatchTraits::Case::Sensitive, MatchTraits::Result::DontNegate>>;
2020-09-07 18:00:37 +00:00
}
REGISTER_FUNCTION(Match)
{
factory.registerFunction<FunctionMatch>();
2022-02-06 01:38:05 +00:00
factory.registerAlias("REGEXP_MATCHES", NameMatch::name, FunctionFactory::CaseInsensitive);
}
}