mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
22 lines
520 B
C++
22 lines
520 B
C++
|
#include "FunctionsStringSearch.h"
|
||
|
#include "FunctionFactory.h"
|
||
|
#include "PositionImpl.h"
|
||
|
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
struct NamePosition
|
||
|
{
|
||
|
static constexpr auto name = "position";
|
||
|
};
|
||
|
|
||
|
using FunctionPosition = FunctionsStringSearch<PositionImpl<PositionCaseSensitiveASCII>, NamePosition>;
|
||
|
|
||
|
void registerFunctionPosition(FunctionFactory & factory)
|
||
|
{
|
||
|
factory.registerFunction<FunctionPosition>(FunctionFactory::CaseInsensitive);
|
||
|
factory.registerAlias("locate", NamePosition::name, FunctionFactory::CaseInsensitive);
|
||
|
}
|
||
|
}
|