upscaledb  2.2.1
Data Fields
uqi_plugin_t Struct Reference

#include <upscaledb_uqi.h>

Data Fields

const char * name
 
uint32_t type
 
uint32_t flags
 
uint32_t plugin_version
 
uqi_plugin_init_function init
 
uqi_plugin_cleanup_function cleanup
 
uqi_plugin_aggregate_single_function agg_single
 
uqi_plugin_aggregate_many_function agg_many
 
uqi_plugin_predicate_function pred
 
uqi_plugin_result_function results
 

Detailed Description

A plugin descriptor. Describes the implementation of a user-supplied aggregation or predicate function and can be loaded dynamically from an external library.

Plugins can be loaded dynamically from a library (.DLL/.SO etc) by specifying a function name in a query string, i.e.

foo@path/to/library.dll

or

foo@l.nosp@m.ibra.nosp@m.ry.so

The library name can be either an absolute path or a (relative) file name, in the latter case the system's library directories will be searched for the file. The library can be ommitted if the plugin was registered with uqi_register_plugin.

After the file is loaded, a function with the following interface is invoked:

 uqi_plugin_t *plugin_descriptor(const char *name);

The parameter |name| is "foo" in our example. The function |plugin_descriptor| must be an exported symbol with the "C" calling convention.

Definition at line 219 of file upscaledb_uqi.h.

Field Documentation

uqi_plugin_aggregate_many_function uqi_plugin_t::agg_many

The aggregation function; must be implemented if type is UQI_PLUGIN_AGGREGATE, otherwise set to null

Definition at line 256 of file upscaledb_uqi.h.

Referenced by main().

uqi_plugin_aggregate_single_function uqi_plugin_t::agg_single

The aggregation function; must be implemented if type is UQI_PLUGIN_AGGREGATE, otherwise set to null

Definition at line 250 of file upscaledb_uqi.h.

Referenced by main().

uqi_plugin_cleanup_function uqi_plugin_t::cleanup

The de-initialization function; can be null

Definition at line 244 of file upscaledb_uqi.h.

Referenced by main().

uint32_t uqi_plugin_t::flags

The plugin flags - either 0, or : if set, then key AND record stream will be passed to the predicate. Otherwise, the query engine will only pass keys (or records), not both.

Definition at line 235 of file upscaledb_uqi.h.

uqi_plugin_init_function uqi_plugin_t::init

The initialization function; can be null

Definition at line 241 of file upscaledb_uqi.h.

Referenced by main().

const char* uqi_plugin_t::name

The name of this plugin

Definition at line 221 of file upscaledb_uqi.h.

Referenced by main().

uint32_t uqi_plugin_t::plugin_version

The version of the plugin's interface; always set to 0

Definition at line 238 of file upscaledb_uqi.h.

uqi_plugin_predicate_function uqi_plugin_t::pred

The predicate function; must be implemented if type is UQI_PLUGIN_PREDICATE, otherwise set to null

Definition at line 262 of file upscaledb_uqi.h.

Referenced by main().

uqi_plugin_result_function uqi_plugin_t::results

Assigns the result to a uqi_result_t structure; must not be null

Definition at line 265 of file upscaledb_uqi.h.

Referenced by main().

uint32_t uqi_plugin_t::type

The type of this plugin - either UQI_PLUGIN_PREDICATE or UQI_PLUGIN_AGGREGATE

Definition at line 227 of file upscaledb_uqi.h.

Referenced by main().


The documentation for this struct was generated from the following file: