2020-03-29 17:04:16 +00:00
|
|
|
#include "FunctionsStringSearch.h"
|
|
|
|
#include "FunctionFactory.h"
|
|
|
|
#include "PositionImpl.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2020-09-07 18:00:37 +00:00
|
|
|
namespace
|
|
|
|
{
|
2020-03-29 17:04:16 +00:00
|
|
|
|
|
|
|
struct NamePositionCaseInsensitive
|
|
|
|
{
|
|
|
|
static constexpr auto name = "positionCaseInsensitive";
|
|
|
|
};
|
|
|
|
|
2021-09-21 16:43:46 +00:00
|
|
|
using FunctionPositionCaseInsensitive = FunctionsStringSearch<PositionImpl<NamePositionCaseInsensitive, PositionCaseInsensitiveASCII>>;
|
2020-03-29 17:04:16 +00:00
|
|
|
|
2020-09-07 18:00:37 +00:00
|
|
|
}
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(PositionCaseInsensitive)
|
2020-03-29 17:04:16 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionPositionCaseInsensitive>();
|
2023-03-13 15:44:38 +00:00
|
|
|
factory.registerAlias("instr", NamePositionCaseInsensitive::name, FunctionFactory::CaseInsensitive);
|
2020-03-29 17:04:16 +00:00
|
|
|
}
|
|
|
|
}
|