| 1 | #include <Functions/FunctionFactory.h> |
|---|---|
| 2 | #include <Functions/FunctionsVisitParam.h> |
| 3 | #include <Functions/FunctionsStringSearch.h> |
| 4 | |
| 5 | |
| 6 | namespace DB |
| 7 | { |
| 8 | |
| 9 | struct HasParam |
| 10 | { |
| 11 | using ResultType = UInt8; |
| 12 | |
| 13 | static UInt8 extract(const UInt8 *, const UInt8 *) |
| 14 | { |
| 15 | return true; |
| 16 | } |
| 17 | }; |
| 18 | |
| 19 | struct NameVisitParamHas { static constexpr auto name = "visitParamHas"; }; |
| 20 | using FunctionVisitParamHas = FunctionsStringSearch<ExtractParamImpl<HasParam>, NameVisitParamHas>; |
| 21 | |
| 22 | |
| 23 | void registerFunctionVisitParamHas(FunctionFactory & factory) |
| 24 | { |
| 25 | factory.registerFunction<FunctionVisitParamHas>(); |
| 26 | } |
| 27 | |
| 28 | } |
| 29 |