mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Move functions registration to .cpp
This commit is contained in:
parent
c82b1d2b59
commit
c984526288
28
src/Functions/FunctionsJSON.cpp
Normal file
28
src/Functions/FunctionsJSON.cpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#include <Functions/FunctionsJSON.h>
|
||||||
|
#include <Functions/FunctionFactory.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace DB
|
||||||
|
{
|
||||||
|
|
||||||
|
REGISTER_FUNCTION(JSON)
|
||||||
|
{
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONHas, JSONHasImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameIsValidJSON, IsValidJSONImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONLength, JSONLengthImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONKey, JSONKeyImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONType, JSONTypeImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractInt, JSONExtractInt64Impl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractUInt, JSONExtractUInt64Impl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractFloat, JSONExtractFloat64Impl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractBool, JSONExtractBoolImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractString, JSONExtractStringImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtract, JSONExtractImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractKeysAndValues, JSONExtractKeysAndValuesImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractRaw, JSONExtractRawImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractArrayRaw, JSONExtractArrayRawImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractKeysAndValuesRaw, JSONExtractKeysAndValuesRawImpl>>();
|
||||||
|
factory.registerFunction<JSONOverloadResolver<NameJSONExtractKeys, JSONExtractKeysImpl>>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <boost/tti/has_member_function.hpp>
|
#include <boost/tti/has_member_function.hpp>
|
||||||
|
|
||||||
@ -34,7 +36,6 @@
|
|||||||
#include <DataTypes/DataTypesNumber.h>
|
#include <DataTypes/DataTypesNumber.h>
|
||||||
#include <DataTypes/Serializations/SerializationDecimal.h>
|
#include <DataTypes/Serializations/SerializationDecimal.h>
|
||||||
|
|
||||||
#include <Functions/FunctionFactory.h>
|
|
||||||
#include <Functions/IFunction.h>
|
#include <Functions/IFunction.h>
|
||||||
#include <Common/JSONParsers/DummyJSONParser.h>
|
#include <Common/JSONParsers/DummyJSONParser.h>
|
||||||
#include <Common/JSONParsers/SimdJSONParser.h>
|
#include <Common/JSONParsers/SimdJSONParser.h>
|
||||||
@ -1619,24 +1620,4 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_FUNCTION(JSON)
|
|
||||||
{
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONHas, JSONHasImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameIsValidJSON, IsValidJSONImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONLength, JSONLengthImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONKey, JSONKeyImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONType, JSONTypeImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractInt, JSONExtractInt64Impl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractUInt, JSONExtractUInt64Impl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractFloat, JSONExtractFloat64Impl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractBool, JSONExtractBoolImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractString, JSONExtractStringImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtract, JSONExtractImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractKeysAndValues, JSONExtractKeysAndValuesImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractRaw, JSONExtractRawImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractArrayRaw, JSONExtractArrayRawImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractKeysAndValuesRaw, JSONExtractKeysAndValuesRawImpl>>();
|
|
||||||
factory.registerFunction<JSONOverloadResolver<NameJSONExtractKeys, JSONExtractKeysImpl>>();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user