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-13 08:52:25 +00:00
|
|
|
using FunctionMatch = FunctionsStringSearch<MatchImpl<NameMatch, false, false, false>>;
|
2020-05-06 23:21:13 +00:00
|
|
|
|
2020-09-07 18:00:37 +00:00
|
|
|
}
|
|
|
|
|
2020-05-06 23:21:13 +00:00
|
|
|
void registerFunctionMatch(FunctionFactory & factory)
|
|
|
|
{
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
}
|