OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExtensionFunctionsBinding.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
23 #ifndef QUERYENGINE_EXTENSIONFUNCTIONSBINDING_H
24 #define QUERYENGINE_EXTENSIONFUNCTIONSBINDING_H
25 
28 
29 #include "../Analyzer/Analyzer.h"
30 #include "../Shared/sqltypes.h"
31 
32 #include <tuple>
33 #include <vector>
34 
35 namespace Analyzer {
36 class FunctionOper;
37 } // namespace Analyzer
38 
39 class ExtensionFunctionBindingError : public std::runtime_error {
40  public:
41  ExtensionFunctionBindingError(const std::string message)
42  : std::runtime_error(message) {}
43 };
44 
47  const bool is_gpu);
48 
51 
53  const bool is_gpu);
54 
55 const std::tuple<table_functions::TableFunction, std::vector<SQLTypeInfo>>
56 bind_table_function(std::string name,
58  const bool is_gpu);
59 
60 #endif // QUERYENGINE_EXTENSIONFUNCTIONSBINDING_H
Supported runtime functions management and retrieval.
ExtensionFunctionBindingError(const std::string message)
std::tuple< T, std::vector< SQLTypeInfo > > bind_function(std::string name, Analyzer::ExpressionPtrVector func_args, const std::vector< T > &ext_funcs, const std::string processor)
const std::tuple< table_functions::TableFunction, std::vector< SQLTypeInfo > > bind_table_function(std::string name, Analyzer::ExpressionPtrVector input_args, const std::vector< table_functions::TableFunction > &table_funcs, const bool is_gpu)
std::vector< ExpressionPtr > ExpressionPtrVector
Definition: Analyzer.h:186
string name
Definition: setup.in.py:72