OmniSciDB  a667adc9c8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExtensionFunctionsBinding.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, 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 
17 /*
18  * @file ExtensionFunctionsBinding.h
19  * @author Alex Suhan <alex@mapd.com>
20  * @brief Argument type based extension function binding.
21  *
22  * Copyright (c) 2016 MapD Technologies, Inc. All rights reserved.
23  */
24 
25 #ifndef QUERYENGINE_EXTENSIONFUNCTIONSBINDING_H
26 #define QUERYENGINE_EXTENSIONFUNCTIONSBINDING_H
27 
30 
31 #include "../Analyzer/Analyzer.h"
32 #include "../Shared/sqltypes.h"
33 
34 #include <tuple>
35 #include <vector>
36 
37 namespace Analyzer {
38 class FunctionOper;
39 } // namespace Analyzer
40 
41 class ExtensionFunctionBindingError : public std::runtime_error {
42  public:
43  ExtensionFunctionBindingError(const std::string message)
44  : std::runtime_error(message) {}
45 };
46 
49  const bool is_gpu);
50 
53 
55  const bool is_gpu);
56 
57 const std::tuple<table_functions::TableFunction, std::vector<SQLTypeInfo>>
58 bind_table_function(std::string name,
60  const bool is_gpu);
61 
62 bool is_ext_arg_type_column(const ExtArgumentType ext_arg_type);
63 bool is_ext_arg_type_column_list(const ExtArgumentType ext_arg_type);
64 bool is_ext_arg_type_array(const ExtArgumentType ext_arg_type);
65 bool is_ext_arg_type_geo(const ExtArgumentType ext_arg_type);
66 bool is_ext_arg_type_pointer(const ExtArgumentType ext_arg_type);
67 bool is_ext_arg_type_scalar(const ExtArgumentType ext_arg_type);
68 #endif // QUERYENGINE_EXTENSIONFUNCTIONSBINDING_H
bool is_ext_arg_type_column_list(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_geo(const ExtArgumentType ext_arg_type)
string name
Definition: setup.in.py:62
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)
bool is_ext_arg_type_array(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_scalar(const ExtArgumentType ext_arg_type)
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:182
bool is_ext_arg_type_column(const ExtArgumentType ext_arg_type)
bool is_ext_arg_type_pointer(const ExtArgumentType ext_arg_type)