mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
30 lines
686 B
C++
30 lines
686 B
C++
#include "FunctionFactory.h"
|
|
#include "countMatches.h"
|
|
|
|
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;
|
|
};
|
|
|
|
}
|
|
|
|
namespace DB
|
|
{
|
|
|
|
REGISTER_FUNCTION(CountMatches)
|
|
{
|
|
factory.registerFunction<FunctionCountMatches<FunctionCountMatchesCaseSensitive>>({}, FunctionFactory::CaseSensitive);
|
|
factory.registerFunction<FunctionCountMatches<FunctionCountMatchesCaseInsensitive>>({}, FunctionFactory::CaseSensitive);
|
|
}
|
|
|
|
}
|