2020-10-23 04:28:25 +00:00
|
|
|
#include "FunctionFactory.h"
|
2020-11-26 20:29:37 +00:00
|
|
|
#include "countMatches.h"
|
2020-10-23 04:28:25 +00:00
|
|
|
|
2020-11-26 20:29:37 +00:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
|
|
|
|
struct FunctionCountMatchesCaseSensitive
|
|
|
|
{
|
|
|
|
static constexpr auto name = "countMatches";
|
|
|
|
static constexpr bool case_insensitive = false;
|
|
|
|
};
|
|
|
|
struct FunctionCountMatchesCaseInsensitive
|
|
|
|
{
|
|
|
|
static constexpr auto name = "countMatchesCaseInsensitive";
|
|
|
|
static constexpr bool case_insensitive = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2020-10-23 04:28:25 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
void registerFunctionCountMatches(FunctionFactory & factory)
|
|
|
|
{
|
2020-11-26 20:29:37 +00:00
|
|
|
factory.registerFunction<FunctionCountMatches<FunctionCountMatchesCaseSensitive>>(FunctionFactory::CaseSensitive);
|
|
|
|
factory.registerFunction<FunctionCountMatches<FunctionCountMatchesCaseInsensitive>>(FunctionFactory::CaseSensitive);
|
2020-10-23 04:28:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|