Oracle Call Interface Programmer's Guide Release 2 (9.2) Part Number A96584-01 |
|
OCI Navigational and Type Functions, 5 of 36
Refreshes a persistent object from the most current database snapshot.
sword OCIObjectRefresh ( OCIEnv *env, OCIError *err, dvoid *object );
The OCI environment handle initialized in object mode. See the description of OCIEnvCreate()
and OCIInitialize()
for more information.
The OCI error handle. If there is an error, it is recorded in err
and this function returns OCI_ERROR. Obtain diagnostic information by calling OCIErrorGet()
.
A pointer to the persistent object, which must already be pinned.
This function refreshes an object with data retrieved from the latest snapshot in the server. An object should be refreshed when the objects in the object cache are inconsistent with the objects at the server.
Caution: Modifications made to objects (dirty objects) since the last flush are lost if unmarked objects are refreshed by this function. |
The various meta-attribute flags and durations of an object are modified after being refreshed:
Object Attribute | Status After Refresh |
---|---|
existent |
set to appropriate value |
pinned |
unchanged |
allocation duration |
unchanged |
pin duration |
unchanged |
The object that is refreshed will be replaced-in-place. When an object is replaced-in-place, the top-level memory of the object will be reused so that new data can be loaded into the same memory address. The top level memory of the null indicator structure is also reused. Unlike the top-level memory chunk, the secondary memory chunks will be freed and reallocated.
You should be careful when writing functionality that holds on to a pointer to the secondary memory chunk, such as assigning the address of a secondary memory to a local variable, because this pointer can become invalid after the object is refreshed.
This function does nothing for transient objects or values.
This section describe the OCI mark or unmark Object and Cache functions.
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|