mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
32 lines
839 B
C++
32 lines
839 B
C++
#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<HasParam>, NameVisitParamHas>;
|
|
|
|
struct NameSimpleJSONHas { static constexpr auto name = "simpleJSONHas"; };
|
|
using FunctionSimpleJSONHas = FunctionsStringSearch<ExtractParamImpl<HasParam>, NameSimpleJSONHas>;
|
|
|
|
void registerFunctionVisitParamHas(FunctionFactory & factory)
|
|
{
|
|
factory.registerFunction<FunctionVisitParamHas>();
|
|
factory.registerFunction<FunctionSimpleJSONHas>();
|
|
}
|
|
|
|
}
|