Oracle® Call Interface Programmer's Guide, 11g Release 2 (11.2) Part Number E10646-02 |
|
|
View PDF |
This section describes the XML DB functions.
Table 23-3 XML DB Functions
Function/Page | Purpose |
---|---|
Create metadata connection context. |
|
Create metadata connection context connection pool. |
|
Associates data connection with the metadata connection. |
|
Specifies that images transferred are in Binary XML format. |
|
Free an XML context. |
|
Initialize an XML context for XML data from the database. |
Purpose
Creates a metadata connection context (OCIBinXmlReposCtx
) from the specified OCIEnv
/OCISvcCtx
dedicated OCI connection. Note that this connection is dedicated to metadata use.
Syntax
sword OCIBinXmlCreateReposCtxFromConn ( OCIEnv *env, OCISvcCtx *svcctx, OCIError *err, OCIBinXmlReposCtx **ctx);
Parameters
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.
Comments
Returns -1 for error, 0 for success. err
will contain more information about the error.
Related Functions
OCIBinXmlCreateReposCtxFromCPool()
Purpose
Creates a metadata connection context (OCIBinXmlReposCtx
) from the specified connection pool. A connection from the connection pool will be used whenever any information from the token repository is needed.
Syntax
sword OCIBinXmlCreateReposCtxFromCPool ( OCIEnv *env, OCICPool *cpool, OCIError *err, OCIBinXmlReposCtx **ctx);
Parameters
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.
Comments
Returns -1 for error, 0 for success. err
will contain more information about the error.
Related Functions
OCIBinXmlCreateReposCtxFromConn()
Purpose
Associates the data connection with the metadata connection. Note that in the case of a dedicated connection the environment handle must be the same for the data connection and for the metadata connection.
Syntax
sword OCIBinXmlSetReposCtxForConn ( OCISvcCtx *dataconn, OCIBinXmlReposCtx *reposctx);
Parameters
The data connection handle.
The pointer to the metadata connection.
Comments
Returns -1 for error, 0 for success. err
will contain more information about the error.
Related Functions
Purpose
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. Currently, Binary XML-aware applications can set this.
Syntax
sword OCIBinXmlSetFormatPref ( xmldomdoc *doc, ub4 formattype);
Parameters
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 OCI_PICKLE_TYPE_BINXML
and OCI_PICKLE_TYPE_TEXT
.
Comments
Returns -1 for error, 0 for success.
Related Functions
Purpose
Free any allocations made by the call to OCIXmlDbInitXmlCtx()
.
Syntax
void OCIXmlDbFreeXmlCtx ( xmlct *xctx );
Parameters
The XML context to terminate.
Comments
Returns -1 for error, 0 for success.
See Also:
"Using OCI XML DB Functions" for a usage example.Related Functions
Purpose
To initialize an XML context for XML data from the database.
Syntax
xmlctx *OCIXmlDbInitXmlCtx ( OCIEnv *envhp, OCISvcCtx *svchp, OCIError *errhp, ocixmldbparam *params, ub4 num_params );
Parameters
The OCI environment handle.
The OCI service handle.
The OCI error handle.
The optional possible values in this array are pointers to:
The OCI duration. Default value is OCI_DURATION_SESSION
.
An error handler which is a user-registered callback of prototype:
void (*err_handler) (sword errcode, (const OraText *) errmsg);
The two parameters of err_handler
are:
A numerical 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.
Comments
See Also:
"Using OCI XML DB Functions" for a usage example.Returns
Returns 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.
Related Functions