ClickHouse/src/Functions/positionCaseInsensitive.cpp

26 lines
580 B
C++

#include "FunctionsStringSearch.h"
#include "FunctionFactory.h"
#include "PositionImpl.h"
namespace DB
{
namespace
{
struct NamePositionCaseInsensitive
{
static constexpr auto name = "positionCaseInsensitive";
};
using FunctionPositionCaseInsensitive = FunctionsStringSearch<PositionImpl<NamePositionCaseInsensitive, PositionCaseInsensitiveASCII>>;
}
REGISTER_FUNCTION(PositionCaseInsensitive)
{
factory.registerFunction<FunctionPositionCaseInsensitive>();
factory.registerAlias("instr", NamePositionCaseInsensitive::name, FunctionFactory::CaseInsensitive);
}
}