The XQC_Expression struct represents a prepared query, and allows the user to execute that query any number of times. More...
#include <xqc.h>
Public Attributes | |
XQC_Error(* | create_context )(const XQC_Expression *expression, XQC_DynamicContext **context) |
Creates a dynamic context suitable for use in the execute() function. More... | |
XQC_Error(* | execute )(const XQC_Expression *expression, const XQC_DynamicContext *context, XQC_Sequence **sequence) |
Executes the query represented by the XQC_Expression object using the values in the XQC_DynamicContext if provided. More... | |
void *(* | get_interface )(const XQC_Expression *expression, const char *name) |
Called to retrieve an implementation specific interface. More... | |
void(* | free )(XQC_Expression *expression) |
Called to free the resources associated with the XQC_Expression. More... | |
The XQC_Expression struct represents a prepared query, and allows the user to execute that query any number of times.
An XQC_Expression object is thread-safe and can be used by multiple threads of execution at the same time.
XQC_Expression objects are created by calling the XQC_Implementation::prepare(), XQC_Implementation::prepare_file() and XQC_Implementation::prepare_stream() functions. Once created, the user is responsible for freeing the object by calling the free() function. The XQC_Expression object should be freed before the XQC_Implementation object that created it.
XQC_Error(* XQC_Expression_s::create_context)(const XQC_Expression *expression, XQC_DynamicContext **context) |
Creates a dynamic context suitable for use in the execute() function.
The user is responsible for freeing the XQC_DynamicContext object returned by calling XQC_DynamicContext::free().
expression | The XQC_Expression that this function pointer is a member of. | |
[out] | context | The newly created XQC_DynamicContext object. |
XQC_NO_ERROR | |
XQC_INTERNAL_ERROR |
XQC_Error(* XQC_Expression_s::execute)(const XQC_Expression *expression, const XQC_DynamicContext *context, XQC_Sequence **sequence) |
Executes the query represented by the XQC_Expression object using the values in the XQC_DynamicContext if provided.
An XQC_Sequence object is returned which can be used to examine the results of the query execution. The user is responsible for freeing the XQC_Sequence object returned by calling XQC_Sequence::free().
expression | The XQC_Expression that this function pointer is a member of. | |
context | The dynamic context information to use when executing the query, or 0 to use the implementation defined default dynamic context. | |
[out] | sequence | The newly created XQC_Sequence object. |
XQC_NO_ERROR | |
XQC_INTERNAL_ERROR | |
XQC_TYPE_ERROR | |
XQC_DYNAMIC_ERROR |
void(* XQC_Expression_s::free)(XQC_Expression *expression) |
Called to free the resources associated with the XQC_Expression.
expression | The XQC_Expression that this function pointer is a member of |
void*(* XQC_Expression_s::get_interface)(const XQC_Expression *expression, const char *name) |
Called to retrieve an implementation specific interface.
expression | The XQC_Expression that this function pointer is a member of. |
name | The name that identifies the interface to return |