#include <xqc.h>
Public Attributes | |
void *(* | get_interface )(const XQC_Implementation *implementation, const char *name) |
Called to retrieve an implementation specific interface. | |
void(* | free )(XQC_Implementation *implementation) |
Called to free the resources associated with the XQC_Implementation. | |
Functions for preparing queries | |
XQC_Error(* | create_context )(XQC_Implementation *implementation, XQC_StaticContext **context) |
Creates a static context suitable for use in the prepare(), prepare_file() and prepare_stream() functions. | |
XQC_Error(* | prepare )(XQC_Implementation *implementation, const char *string, const XQC_StaticContext *context, XQC_Expression **expression) |
Prepares a query from a UTF-8 string, returning an XQC_Expression object. | |
XQC_Error(* | prepare_file )(XQC_Implementation *implementation, FILE *file, const XQC_StaticContext *context, XQC_Expression **expression) |
Prepares a query from a FILE pointer, returning an XQC_Expression object. | |
XQC_Error(* | prepare_stream )(XQC_Implementation *implementation, XQC_InputStream *stream, const XQC_StaticContext *context, XQC_Expression **expression) |
Prepares a query from an XQC_InputStream, returning an XQC_Expression object. | |
Functions for parsing documents | |
XQC_Error(* | parse_document )(XQC_Implementation *implementation, const char *string, XQC_Sequence **sequence) |
XQC_PARSE_ERROR. | |
XQC_Error(* | parse_document_file )(XQC_Implementation *implementation, FILE *file, XQC_Sequence **sequence) |
XQC_PARSE_ERROR. | |
XQC_Error(* | parse_document_stream )(XQC_Implementation *implementation, XQC_InputStream *stream, XQC_Sequence **sequence) |
XQC_PARSE_ERROR. | |
Functions for creating sequences | |
XQC_Error(* | create_empty_sequence )(XQC_Implementation *implementation, XQC_Sequence **sequence) |
XQC_Error(* | create_singleton_sequence )(XQC_Implementation *implementation, XQC_ItemType type, const char *value, XQC_Sequence **sequence) |
XQC_Error(* | create_string_sequence )(XQC_Implementation *implementation, const char *values[], unsigned int count, XQC_Sequence **sequence) |
XQC_Error(* | create_integer_sequence )(XQC_Implementation *implementation, int values[], unsigned int count, XQC_Sequence **sequence) |
XQC_Error(* | create_double_sequence )(XQC_Implementation *implementation, double values[], unsigned int count, XQC_Sequence **sequence) |
An XQC_Implementation object is thread-safe and can be used by multiple threads of execution at the same time.
The method of creating an XQC_Implementation object is beyond the scope of this API, and will typically involve calling an implementation defined function. Once created, the user is responsible for freeing the object by calling the free() function. The XQC_Implementation object should not be freed before all objects created using it's functions have been freed - doing so may cause undefined behaviour.
|
Creates a static context suitable for use in the prepare(), prepare_file() and prepare_stream() functions. The user is responsible for freeing the XQC_StaticContext object returned by calling XQC_StaticContext::free().
|
|
|
|
|
|
|
|
|
|
|
|
Called to free the resources associated with the XQC_Implementation.
|
|
Called to retrieve an implementation specific interface.
|
|
XQC_PARSE_ERROR.
|
|
XQC_PARSE_ERROR.
|
|
XQC_PARSE_ERROR.
|
|
Prepares a query from a UTF-8 string, returning an XQC_Expression object. The user remains responsible for closing the file after preparation. The user is responsible for freeing the XQC_Expression object returned by calling XQC_Expression::free().
|
|
Prepares a query from a FILE pointer, returning an XQC_Expression object. The encoding of the query in the file is determined by the implementation. The user remains responsible for closing the file after preparation. The user is responsible for freeing the XQC_Expression object returned by calling XQC_Expression::free().
|
|
Prepares a query from an XQC_InputStream, returning an XQC_Expression object. The encoding of the stream is determined by looking at XQC_InputStream::encoding, or by the implementation if XQC_InputStream::encoding is 0. The implementation is responsible for freeing the XQC_InputStream using the XQC_InputStream::free() function after it has finished with using it. The user is responsible for freeing the XQC_Expression object returned by calling XQC_Expression::free().
|