Vertica::ServerInterface Class Reference

List of all members.

Public Types

typedef void(*) LoggingFunc (ServerInterface *, const char *fmt, va_list ap)

Public Member Functions

const std::string & getCurrentNodeName () const
const std::map< std::string,
std::string > & 
getDependencies () const
const std::string & getLocale () const
ParamReader getParamReader ()
ParamReader getSessionParamReader ()
void log (const char *format,...) __attribute__((format(printf
 ServerInterface (VTAllocator *allocator, LoggingFunc func, const std::string &sqlName, vint udxDebugLogLevel=0)
 ServerInterface (VTAllocator *allocator, LoggingFunc func, const std::string &sqlName, const ParamReader &paramReader, vint udxDebugLogLevel=0)
 ServerInterface (VTAllocator *allocator, FileManager *fileManager, LoggingFunc func, const std::string &sqlName, const ParamReader &paramReader, vint udxDebugLogLevel=0)
void setDependencies (const std::map< std::string, std::string > &dependencies)
void setParamReader (const ParamReader &paramReader)
void setSessionParamReader (const ParamReader &sessionParamReader)

Public Attributes

VTAllocator * allocator
FileManager * fileManager

Protected Attributes

std::map< std::string, std::string > dependencies
std::string locale
std::string nodeName
ParamReader paramReader
ParamReader sessionParamReader
std::string sqlName
LoggingFunc vlogPtr

Friends

class ::UdfSupport
class EE::UserDefinedAggregate
class EE::UserDefinedAnalytic
class EE::UserDefinedTransform

Detailed Description

Interface that UDX writers can use to interact with the Vertica Server


Constructor & Destructor Documentation

Vertica::ServerInterface::ServerInterface ( VTAllocator *  allocator,
FileManager *  fileManager,
LoggingFunc  func,
const std::string &  sqlName,
const ParamReader &  paramReader,
vint  udxDebugLogLevel = 0 
) [inline]

Create a new ServerInterface.

Note:
that Only Vertica Server should use this method. It is not guaranteed to stay the same between releases.


Member Function Documentation

const std::string& Vertica::ServerInterface::getCurrentNodeName (  )  const [inline]

Returns:
the name of the vertica node on which this code is executed.

const std::map<std::string, std::string>& Vertica::ServerInterface::getDependencies (  )  const [inline]

Returns:
a list of paths to rhe dependencies

const std::string& Vertica::ServerInterface::getLocale (  )  const [inline]

Returns:
the locale of the current session.

ParamReader Vertica::ServerInterface::getParamReader (  )  [inline]

Returns the ParamReader that allows accessing parameter values using their names

ParamReader Vertica::ServerInterface::getSessionParamReader (  )  [inline]

Get the sessionParamReader

void Vertica::ServerInterface::log ( const char *  format,
  ... 
)

Write a message to the vertica.log system log. The message will contain the SQL name of the user defined function or transform being called

Parameters:
format a printf style format string specifying the log message format.

void Vertica::ServerInterface::setDependencies ( const std::map< std::string, std::string > &  dependencies  )  [inline]

Returns:
set the paths to the dependencies

void Vertica::ServerInterface::setParamReader ( const ParamReader &  paramReader  )  [inline]

Set the paramReader of this ServerInterface when delayed creation is required Used by the code when delayed creation of the parameters is needed Users should not call this function

void Vertica::ServerInterface::setSessionParamReader ( const ParamReader &  sessionParamReader  )  [inline]

Set the sessionParamReader


Member Data Documentation

VTAllocator* Vertica::ServerInterface::allocator

Memory source which is managed and freed by the server.

std::map<std::string, std::string> Vertica::ServerInterface::dependencies [protected]

The list of all dependencies

FileManager* Vertica::ServerInterface::fileManager

File manager of the session context

std::string Vertica::ServerInterface::locale [protected]

The locale of the current session

std::string Vertica::ServerInterface::nodeName [protected]

Store the name of the current node

ParamReader Vertica::ServerInterface::paramReader [protected]

A reader for paremeters that have been toknized using the following format: key1=val1,key2=val2,key3=val3. Has accessor methods like BlockReader to be able to access parameters of different data types

ParamReader Vertica::ServerInterface::sessionParamReader [protected]

A map for session paremeters UDx might specify what session parameters it wants in its "manifest" Server will try to provide, if it agrees with that request

std::string Vertica::ServerInterface::sqlName [protected]

Store the name for error logging

LoggingFunc Vertica::ServerInterface::vlogPtr [protected]

Callback for logging, set by the server