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