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