C++ SDK Documentation  9.0
Vertica::ScalarFunctionFactory Class Referenceabstract

Interface for declaring parameters and return types for, and instantiating, an associated ScalarFunction. More...

Inheritance diagram for Vertica::ScalarFunctionFactory:
Inheritance graph
Collaboration diagram for Vertica::ScalarFunctionFactory:
Collaboration graph

Public Types

enum  UDXType {
  FUNCTION, TRANSFORM, ANALYTIC, MULTI_TRANSFORM,
  AGGREGATE, LOAD_SOURCE, LOAD_FILTER, LOAD_PARSER,
  FILESYSTEM, TYPE, CURSOR_TRANSFORM
}
 

Public Member Functions

virtual ScalarFunctioncreateScalarFunction (ServerInterface &srvInterface)=0
 
virtual void getParameterType (ServerInterface &srvInterface, SizedColumnTypes &parameterTypes)
 
virtual void getPerInstanceResources (ServerInterface &srvInterface, VResources &res)
 
virtual void getPerInstanceResources (ServerInterface &srvInterface, VResources &res, const SizedColumnTypes &inputTypes)
 
virtual void getPrototype (ServerInterface &srvInterface, ColumnTypes &argTypes, ColumnTypes &returnType)=0
 
virtual void getReturnType (ServerInterface &srvInterface, const SizedColumnTypes &argTypes, SizedColumnTypes &returnType)
 

Public Attributes

strictness strict
 
volatility vol
 

Protected Member Functions

virtual UDXType getUDXFactoryType ()
 

Protected Attributes

Oid libOid
 
std::string sqlName
 

Detailed Description

Interface for declaring parameters and return types for, and instantiating, an associated ScalarFunction.

Member Enumeration Documentation

The type of UDX instance this factory produces

Member Function Documentation

virtual ScalarFunction* Vertica::ScalarFunctionFactory::createScalarFunction ( ServerInterface srvInterface)
pure virtual
Returns
an ScalarFunction object which implements the UDx API described by this metadata.
Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
Note
More than one object may be instantiated per query.
virtual void Vertica::UDXFactory::getParameterType ( ServerInterface srvInterface,
SizedColumnTypes parameterTypes 
)
inlinevirtualinherited

Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.

Reimplemented in Vertica::ParserFactory.

virtual void Vertica::UDXFactory::getPerInstanceResources ( ServerInterface srvInterface,
VResources res 
)
inlinevirtualinherited

Set the resource required for each instance of the UDX Object subclass. Users should override only one of the following methods.

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
resa VResources object used to tell Vertica what resources are needed by the UDX

Reimplemented in Vertica::UDLFactory.

virtual void Vertica::UDXFactory::getPerInstanceResources ( ServerInterface srvInterface,
VResources res,
const SizedColumnTypes inputTypes 
)
inlinevirtualinherited

Set the resource required for each instance of the UDX Object subclass. Users should override only one of the following methods.

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
resa VResources object used to tell Vertica what resources are needed by the UDX
argTypesProvides the data types of arguments that this UDT was called with

Reimplemented in Vertica::UDLFactory.

virtual void Vertica::UDXFactory::getPrototype ( ServerInterface srvInterface,
ColumnTypes argTypes,
ColumnTypes returnType 
)
pure virtualinherited

Provides the argument and return types of the UDX

Implemented in Vertica::UDLFactory, Vertica::MultiPhaseTransformFunctionFactory, and Vertica::UDFileSystemFactory.

virtual void Vertica::ScalarFunctionFactory::getReturnType ( ServerInterface srvInterface,
const SizedColumnTypes argTypes,
SizedColumnTypes returnType 
)
inlinevirtual

For scalar functions, this function needs to be overridden only if the return type needs length/precision specification.

Parameters
srvInterfacea ServerInterface object used to communicate with Vertica
argTypesThe data type of the return value defined by processBlock()
returnTypeThe size of the data returned by processBlock()

Implements Vertica::UDXFactory.

virtual UDXType Vertica::ScalarFunctionFactory::getUDXFactoryType ( )
inlineprotectedvirtual
Returns
the object type internally used by Vertica

Implements Vertica::UDXFactory.

Member Data Documentation

volatility Vertica::ScalarFunctionFactory::vol

Strictness and Volatility settings that the UDSF programmer can set Defaults are VOLATILE and CALLED_ON_NULL_INPUT