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";
|
|
|
|
};
|
|
|
|
|
2021-09-21 16:43:46 +00:00
|
|
|
using FunctionMatch = FunctionsStringSearch<MatchImpl<NameMatch, 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-05 11:44:21 +00:00
|
|
|
factory.registerAlias("REGEXP_MATCHES", NameMatch::name);
|
2020-05-06 23:21:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|