ClickHouse/src/Functions/replaceAll.cpp

27 lines
508 B
C++
Raw Normal View History

#include "FunctionStringReplace.h"
#include "FunctionFactory.h"
#include "ReplaceStringImpl.h"
namespace DB
{
2020-09-07 18:00:37 +00:00
namespace
{
struct NameReplaceAll
{
static constexpr auto name = "replaceAll";
};
using FunctionReplaceAll = FunctionStringReplace<ReplaceStringImpl<false>, NameReplaceAll>;
2020-09-07 18:00:37 +00:00
}
void registerFunctionReplaceAll(FunctionFactory & factory)
{
factory.registerFunction<FunctionReplaceAll>();
factory.registerAlias("replace", NameReplaceAll::name, FunctionFactory::CaseInsensitive);
}
}