OmniSciDB  06b3bd477c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExtensionFunctionsBinding.h File Reference
#include "ExtensionFunctionsWhitelist.h"
#include "../Analyzer/Analyzer.h"
#include "../Shared/sqltypes.h"
#include <vector>
+ Include dependency graph for ExtensionFunctionsBinding.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Analyzer
 

Functions

ExtensionFunction bind_function (std::string name, Analyzer::ExpressionPtrVector func_args)
 
ExtensionFunction bind_function (const Analyzer::FunctionOper *function_oper)
 
bool is_ext_arg_type_array (const ExtArgumentType ext_arg_type)
 
bool is_ext_arg_type_geo (const ExtArgumentType ext_arg_type)
 

Function Documentation

ExtensionFunction bind_function ( std::string  name,
Analyzer::ExpressionPtrVector  func_args 
)

Definition at line 377 of file ExtensionFunctionsBinding.cpp.

References bind_function(), and ExtensionFunctionsWhitelist::get_ext_funcs().

378  {
379  // used in RelAlgTranslator.cpp
380  std::vector<ExtensionFunction> ext_funcs =
382  return bind_function(name, func_args, ext_funcs);
383 }
static std::vector< ExtensionFunction > get_ext_funcs(const std::string &name)
ExtensionFunction bind_function(std::string name, Analyzer::ExpressionPtrVector func_args, const std::vector< ExtensionFunction > &ext_funcs)

+ Here is the call graph for this function:

ExtensionFunction bind_function ( const Analyzer::FunctionOper function_oper)

Definition at line 385 of file ExtensionFunctionsBinding.cpp.

References bind_function(), Analyzer::FunctionOper::getArity(), Analyzer::FunctionOper::getName(), and Analyzer::FunctionOper::getOwnArg().

385  {
386  // used in ExtensionIR.cpp
387  auto name = function_oper->getName();
388  Analyzer::ExpressionPtrVector func_args = {};
389  for (size_t i = 0; i < function_oper->getArity(); ++i) {
390  func_args.push_back(function_oper->getOwnArg(i));
391  }
392  return bind_function(name, func_args);
393 }
size_t getArity() const
Definition: Analyzer.h:1361
ExtensionFunction bind_function(std::string name, Analyzer::ExpressionPtrVector func_args, const std::vector< ExtensionFunction > &ext_funcs)
std::shared_ptr< Analyzer::Expr > getOwnArg(const size_t i) const
Definition: Analyzer.h:1368
std::vector< ExpressionPtr > ExpressionPtrVector
Definition: Analyzer.h:183
std::string getName() const
Definition: Analyzer.h:1359

+ Here is the call graph for this function:

bool is_ext_arg_type_array ( const ExtArgumentType  ext_arg_type)

Definition at line 395 of file ExtensionFunctionsBinding.cpp.

References ArrayBool, ArrayDouble, ArrayFloat, ArrayInt16, ArrayInt32, ArrayInt64, and ArrayInt8.

Referenced by CodeGenerator::codegenFunctionOperCastArgs(), ExtensionFunctionsWhitelist::getLLVMDeclarations(), and anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments().

+ Here is the caller graph for this function:

bool is_ext_arg_type_geo ( const ExtArgumentType  ext_arg_type)

Definition at line 411 of file ExtensionFunctionsBinding.cpp.

References GeoLineString, GeoMultiPolygon, GeoPoint, and GeoPolygon.

Referenced by CodeGenerator::codegenFunctionOperCastArgs().

411  {
412  switch (ext_arg_type) {
417  return true;
418 
419  default:
420  return false;
421  }
422 }

+ Here is the caller graph for this function: