Table 23-2 lists the OCI XML DB functions that are described in this chapter.
Table 23-2 OCI XML DB Functions
Function | Purpose |
---|---|
Create metadata connection context |
|
Create metadata connection context connection pool |
|
Specify that images transferred are in binary XML format |
|
Associate data connection with the metadata connection |
|
Free an XML context |
|
Initialize an XML context for XML data from the database |
Creates a metadata connection context (OCIBinXmlReposCtx
) from the specified OCIEnv
/OCISvcCtx
dedicated OCI connection. Note that this connection is dedicated to metadata use.
sword OCIBinXmlCreateReposCtxFromConn ( OCIEnv *env, OCISvcCtx *svcctx, OCIError *err, OCIBinXmlReposCtx **ctx);
The environment handle.
The handle to the connection to be used to access the metadata.
The error handle.
The metadata context that is created and returned.
Returns -1 for error, 0 for success. The err
parameter contains more information about the error.
Creates a metadata connection context (OCIBinXmlReposCtx
) from the specified connection pool. A connection from the connection pool is used whenever any information from the token repository is needed.
sword OCIBinXmlCreateReposCtxFromCPool ( OCIEnv *env, OCICPool *cpool, OCIError *err, OCIBinXmlReposCtx **ctx);
The environment handle.
The handle to the connection to be used to access the metadata.
The error handle.
The metadata context that is created and returned.
Returns -1 for error, 0 for success. The err
parameter contains more information about the error.
Specifies that the images being transferred between client and server for the XML document be in binary XML format. In the future, all communication will be in the binary XML format. Binary XML-aware applications can set this.
The pointer to the domdoc
to which the preference is to be applied.
The type of format to be used for pickling. Currently the only values allowed are OCIXML_FORMATTYPE_TEXT
and OCIXML_FORMATTYPE_BINXML
.
Associates the data connection with the metadata connection. Note that with a dedicated connection, the environment handle must be the same for the data connection and for the metadata connection.
The data connection handle.
The pointer to the metadata connection.
Returns -1 for error, 0 for success. The err
parameter contains more information about the error.
xmlctx *OCIXmlDbInitXmlCtx ( OCIEnv *envhp, OCISvcCtx *svchp, OCIError *errhp, ocixmldbparam *params, ub4 num_params );
The OCI environment handle.
The OCI service handle.
The OCI error handle.
The optional possible values in this array are pointers to either the OCI duration, in which the default value is OCI_DURATION_SESSION
, or to an error handler that is a user-registered callback of prototype:
void (*err_handler) (sword errcode, (const OraText *) errmsg);
The two parameters of err_handler
are:
A numeric error value.
The error message text.
Number of parameters to be read from params.
If the value of num_params
exceeds the size of array params
, unexpected behavior results.
See Also:
"Using OCI XML DB Functions" for a usage exampleReturns either:
A pointer to structure xmlctx
, with error handler and callbacks populated with appropriate values. This is later used for all OCI calls.
NULL, if no database connection is available.