ClickHouse/src/Functions/position.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
510 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)
{
2022-08-27 20:06:03 +00:00
factory.registerFunction<FunctionPosition>({}, FunctionFactory::CaseInsensitive);
factory.registerAlias("locate", NamePosition::name, FunctionFactory::CaseInsensitive);
}
}