mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
4088c0a7f3
Automated register all functions with below naming convention by iterating through the symbols: void DB::registerXXX(DB::FunctionFactory &)
27 lines
517 B
C++
27 lines
517 B
C++
#include "FunctionsStringSearch.h"
|
|
#include "FunctionFactory.h"
|
|
#include "MatchImpl.h"
|
|
|
|
|
|
namespace DB
|
|
{
|
|
namespace
|
|
{
|
|
|
|
struct NameMatch
|
|
{
|
|
static constexpr auto name = "match";
|
|
};
|
|
|
|
using FunctionMatch = FunctionsStringSearch<MatchImpl<NameMatch, MatchTraits::Syntax::Re2, MatchTraits::Case::Sensitive, MatchTraits::Result::DontNegate>>;
|
|
|
|
}
|
|
|
|
REGISTER_FUNCTION(Match)
|
|
{
|
|
factory.registerFunction<FunctionMatch>();
|
|
factory.registerAlias("REGEXP_MATCHES", NameMatch::name, FunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|