C++ SDK Documentation
23.4.0
|
Provides UDxs with access to the Vertica server. More...
Classes | |
struct | BlobDescription |
struct | BlobIdentifier |
struct | FunctionDescription |
struct | RelationDescription |
struct | TypeDescription |
Public Types | |
typedef void(* | LoggingFunc )(ServerInterface *, const char *fmt, va_list ap) |
Public Member Functions | |
ServerInterface (VTAllocator *allocator, FileManager *fileManager, LoggingFunc func, const std::string &sqlName, const ParamReader ¶mReader, vint udxDebugLogLevel=0) | |
ServerInterface (VTAllocator *allocator, LoggingFunc func, const std::string &sqlName, const ParamReader ¶mReader, vint udxDebugLogLevel=0) | |
ServerInterface (VTAllocator *allocator, LoggingFunc func, const std::string &sqlName, vint udxDebugLogLevel=0) | |
formatWithName | append (" - ") |
formatWithName | append (format) |
virtual bool | describeBlob (const BlobIdentifier &blobId, BlobDescription &blobDescription, bool errorIfNotFound=true)=0 |
virtual bool | describeFunction (FunctionDescription &func, bool errorIfNotFound=true)=0 |
virtual bool | describeProjection (RelationDescription &proj, bool errorIfNotFound=true)=0 |
virtual bool | describeTable (RelationDescription &baseTable, bool errorIfNotFound=true)=0 |
virtual bool | describeType (TypeDescription &type, bool errorIfNotFound=true)=0 |
void std::string | formatWithName (sqlName) |
const std::string & | getCurrentNodeName () const |
const std::string & | getDatabaseName () const |
const std::map< std::string, std::string > & | getDependencies () const |
virtual const UDFileSystem * | getFileSystem (const char *path)=0 |
Oid | getFunctionOid () const |
const std::string & | getLocale () const |
ParamReader | getParamReader () const |
ParamReader | getSessionParamReader () const |
ParamReader | getUDSessionParamReader (std::string nsp) |
ParamReader | getUDSessionParamReader () const |
SessionParamReaderMap | getUDSessionParamReaderMap () const |
const std::string & | getUserName () const |
virtual std::vector < BlobDescription > | listBlobs (BlobIdentifier::Namespace nsp=BlobIdentifier::NSP_LIBRARY)=0 |
virtual void | listDerivedTables (const RelationDescription &baseTable, std::vector< Oid > &tables, bool errorIfNotFound=false)=0 |
virtual void | listProjections (const RelationDescription &lookup, std::vector< Oid > &projections, bool errorIfNotFound=false)=0 |
virtual void | listTableProjections (const RelationDescription &baseTable, std::vector< Oid > &projections, bool errorIfNotFound=false)=0 |
virtual void | listTables (const RelationDescription &lookup, std::vector< Oid > &tables, bool errorIfNotFound=false)=0 |
void | log (const char *format,...) __attribute__((format(printf |
virtual void | logEvent (const std::map< std::string, std::string > &details)=0 |
virtual void | reportError (ClientMessage msg)=0 |
virtual void | reportInfo (ClientMessage msg)=0 |
virtual void | reportNotice (ClientMessage msg)=0 |
virtual void | reportWarning (ClientMessage msg)=0 |
void | setDependencies (const std::map< std::string, std::string > dependencies) |
void | setFunctionOid (Oid FuncOid) |
void | setLibraryOid (Oid libOid_) |
void | setParamReader (const ParamReader ¶mReader) |
void | setPublicOid (Oid publicOid_) |
void | setSessionParamReader (const ParamReader &sessionParamReader) |
void | setUDSessionParameterMap (const SessionParamReaderMap &udSessionParams) |
va_end (ap) | |
va_start (ap, format) | |
vlog (format, ap) | |
void | vlog (const char *format, va_list ap) |
Public Attributes | |
VTAllocator * | allocator |
va_list | ap |
FileManager * | fileManager |
format = formatWithName.c_str() | |
vint | udxDebugLogLevel |
Protected Attributes | |
std::string | dbName |
std::map< std::string, std::string > | dependencies |
Oid | funcOid |
Oid | libOid |
std::string | locale |
std::string | nodeName |
ParamReader | paramReader |
Oid | publicOid |
ParamReader | sessionParamReader |
std::string | sqlName |
SessionParamReaderMap | udSessionParamReaderMap |
std::string | userName |
LoggingFunc | vlogPtr |
Friends | |
class | ::UdfSupport |
class | ::UDxExecContext |
class | EE::UserDefinedAggregate |
class | EE::UserDefinedAnalytic |
class | EE::UserDefinedTransform |
Provides UDxs with access to the Vertica server.
Vertica passes a ServerInterface instance to the setup(), destroy(), and main processing functions of each UDx. Key methods for UDx use include log() (to write to the Vertica log), getParamReader(), setParamReader(), getSessionParamReader(), and setSessionParamReader().
|
inline |
Create a new ServerInterface.
|
pure virtual |
Given a blob name and namespace (to which search path will be applied), find the rest of the details
|
pure virtual |
Describe a function
|
pure virtual |
Given a projection OID or name, find the rest of the details
|
pure virtual |
Given a table OID or name (to which search path will be applied), find the rest of the details
|
pure virtual |
Describe a type
|
inline |
|
inline |
|
inline |
|
pure virtual |
Get the file system corresponding to the provided path.
|
inline |
|
inline |
Returns the ParamReader that allows accessing parameter values using their names
|
inline |
Get the sessionParamReader
|
inline |
Get the UDSessionParamReader for a namespace
|
inline |
Get the UDSessionParamReader for the default namespace
|
inline |
Get the UDSessionParamReaderMap
|
inline |
|
pure virtual |
List the blobs in the given namespace
|
pure virtual |
List out derived tables, such as text indexes
|
pure virtual |
List projections given projection name
|
pure virtual |
List projections given base table properties (schema + name, OID, etc.)
|
pure virtual |
List tables given properties (schema, name, etc.)
void Vertica::ServerInterface::log | ( | const char * | format, |
... | |||
) |
Writes a message to a log file stored in the UDxLogs directory of the database's catalog directory. The SQL name of the UDx is added to the log message, along with the string [UserMessage] to mark the entry as a message added by a call to this method.
format | a printf-style format string specifying the log message format. |
|
pure virtual |
Logs an event composed of a map of key-value pairs to dc_udx_events, which can be queried using v_monitor.udx_events view.
Events logged from a fenced UDX are logged to a file and are not query-able.
|
pure virtual |
Report the provided ClientMessage as an error
msg | The message to be reported |
|
pure virtual |
Report the provided ClientMessage as info
msg | The message to be reported |
|
pure virtual |
Report the provided ClientMessage as a notice
msg | The message to be reported |
|
pure virtual |
Report the provided ClientMessage as a warning
msg | The message to be reported |
|
inline |
|
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
|
inline |
Set the sessionParamReader
|
inline |
Set the UDSessionParamReaderMap
|
inline |
Write a message to the vertica.log system log.
format | a printf style format string specifying the log message format. |
ap | va_list for variable arguments |
VTAllocator* Vertica::ServerInterface::allocator |
Memory source which is managed and freed by the server.
|
protected |
Store the name of the current database
Referenced by getDatabaseName().
|
protected |
The list of all dependencies
Referenced by getDependencies(), and setDependencies().
FileManager* Vertica::ServerInterface::fileManager |
File manager of the session context
|
protected |
The Oid of the function
|
protected |
The Oid of the library
|
protected |
The locale of the current session
Referenced by getLocale().
|
protected |
Store the name of the current node
Referenced by getCurrentNodeName().
|
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
Referenced by getParamReader(), and setParamReader().
|
protected |
The Oid for public user-defined session parameters and blobs
|
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
Referenced by getSessionParamReader(), and setSessionParamReader().
|
protected |
Store the name for error logging
|
protected |
A map for session UDParameters that were set in the session by a user or by a UDx
Referenced by getUDSessionParamReader(), getUDSessionParamReaderMap(), and setUDSessionParameterMap().
vint Vertica::ServerInterface::udxDebugLogLevel |
The level of UDx debug logging which is turned on as a UDXDebugLevel set of enumeration values. Used so UDxs may forgo generating debug log messages if debug logging is off.
|
protected |
The username of the current session
Referenced by getUserName().
|
protected |
Callback for logging, set by the server
Referenced by vlog().