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 NameReplaceOne
|
|
|
|
{
|
|
|
|
static constexpr auto name = "replaceOne";
|
|
|
|
};
|
|
|
|
|
2023-02-20 09:10:25 +00:00
|
|
|
using FunctionReplaceOne = FunctionStringReplace<ReplaceStringImpl<NameReplaceOne, ReplaceStringTraits::Replace::First>, NameReplaceOne>;
|
2020-05-06 23:21:13 +00:00
|
|
|
|
2020-09-07 18:00:37 +00:00
|
|
|
}
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(ReplaceOne)
|
2020-05-06 23:21:13 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionReplaceOne>();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|