ClickHouse/src/Functions/visitParamHas.cpp

32 lines
810 B
C++
Raw Normal View History

#include <Functions/FunctionFactory.h>
#include <Functions/FunctionsVisitParam.h>
#include <Functions/FunctionsStringSearch.h>
namespace DB
{
struct HasParam
{
using ResultType = UInt8;
static UInt8 extract(const UInt8 *, const UInt8 *)
{
return true;
}
};
struct NameVisitParamHas { static constexpr auto name = "visitParamHas"; };
using FunctionVisitParamHas = FunctionsStringSearch<ExtractParamImpl<NameVisitParamHas, HasParam>>;
2021-04-01 20:07:01 +00:00
struct NameSimpleJSONHas { static constexpr auto name = "simpleJSONHas"; };
using FunctionSimpleJSONHas = FunctionsStringSearch<ExtractParamImpl<NameSimpleJSONHas, HasParam>>;
REGISTER_FUNCTION(VisitParamHas)
{
factory.registerFunction<FunctionVisitParamHas>();
2021-03-30 16:25:56 +00:00
factory.registerFunction<FunctionSimpleJSONHas>();
}
}