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
|
|
|
|
{
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(CountMatches)
|
2020-10-23 04:28:25 +00:00
|
|
|
{
|
2022-08-27 20:06:03 +00:00
|
|
|
factory.registerFunction<FunctionCountMatches<FunctionCountMatchesCaseSensitive>>({}, FunctionFactory::CaseSensitive);
|
|
|
|
factory.registerFunction<FunctionCountMatches<FunctionCountMatchesCaseInsensitive>>({}, FunctionFactory::CaseSensitive);
|
2020-10-23 04:28:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|