ClickHouse/src/Functions/position.cpp

26 lines
506 B
C++
Raw Normal View History

#include "FunctionsStringSearch.h"
#include "FunctionFactory.h"
#include "PositionImpl.h"
namespace DB
{
2020-09-07 18:00:37 +00:00
namespace
{
struct NamePosition
{
static constexpr auto name = "position";
};
using FunctionPosition = FunctionsStringSearch<PositionImpl<NamePosition, PositionCaseSensitiveASCII>>;
2020-09-07 18:00:37 +00:00
}
REGISTER_FUNCTION(Position)
{
factory.registerFunction<FunctionPosition>(FunctionFactory::CaseInsensitive);
factory.registerAlias("locate", NamePosition::name, FunctionFactory::CaseInsensitive);
}
}