Oracle® Call Interface Programmer's Guide, 10g Release 2 (10.2) Part Number B14250-02 |
|
|
PDF · Mobi · ePub |
This section describes the OCI Raw functions.
Function/Page | Purpose |
---|---|
Get allocated size of raw memory in bytes |
|
Assign raw bytes to raw |
|
Assign raw to raw |
|
Get raw data Pointer |
|
Resize memory of variable-length raw |
|
Get raw size |
Gets allocated size of raw memory in bytes.
sword OCIRawAllocSize ( OCIEnv *env, OCIError *err, CONST OCIRaw *raw, ub4 *allocsize );
The OCI environment handle initialized in object mode.
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()
.
Raw data whose allocated size in bytes is returned. This must be a non-NULL
pointer.
The allocated size of raw memory in bytes is returned.
The allocated size is greater than or equal to the actual raw size.
OCIErrorGet(), OCIRawResize(), OCIRawSize()
Assigns raw bytes of type ub1*
to Oracle OCIRaw*
datatype.
sword OCIRawAssignBytes ( OCIEnv *env, OCIError *err, CONST ub1 *rhs, ub4 rhs_len, OCIRaw **lhs );
The OCI environment handle initialized in object mode.
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()
.
Right-hand side (source) of the assignment, of datatype ub1
.
Length of the rhs
raw bytes.
Left-hand side (target) of the assignment OCIRaw
data.
Assigns rhs
raw bytes to lhs
raw datatype. The lhs
raw may be resized depending upon the size of the rhs
. The raw bytes assigned are of type ub1
.
OCIErrorGet(), OCIRawAssignRaw()
Assign one Oracle raw datatype to another Oracle raw datatype.
sword OCIRawAssignRaw ( OCIEnv *env, OCIError *err, CONST OCIRaw *rhs, OCIRaw **lhs );
The OCI environment handle initialized in object mode.
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()
.
Right-hand side (source) of the assignment; OCIRaw
data.
Left-hand side (target) of the assignment; OCIRaw
data.
Assigns rhs
raw to lhs
raw. The lhs
raw may be resized depending upon the size of the rhs
.
OCIErrorGet(), OCIRawAssignBytes()
Gets the pointer to raw data.
ub1 *OCIRawPtr ( OCIEnv *env, CONST OCIRaw *raw );
The OCI environment handle initialized in object mode.
Pointer to the data of a given raw is returned.
None.
OCIErrorGet(), OCIRawAssignRaw()
Resizes the memory of a given variable-length raw.
sword OCIRawResize ( OCIEnv *env, OCIError *err, ub2 new_size, OCIRaw **raw );
The OCI environment handle initialized in object mode.
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()
.
New size of the raw data in bytes.
Variable-length raw pointer; the raw is resized to new_size
.
This function resizes the memory of the given variable-length raw in the object cache. The previous contents of the raw are not preserved. This function may allocate the raw in a new memory region in which case the original memory occupied by the given raw will be freed. If the input raw is NULL
(raw
== NULL
), then this function will allocate memory for the raw data.
If the new_size
is 0, then this function frees the memory occupied by raw
and a NULL
pointer value is returned.
OCIErrorGet(), OCIRawAllocSize(), OCIRawSize()
Returns the size of a given raw in bytes.
ub4 OCIRawSize ( OCIEnv *env, CONST OCIRaw *raw );
The OCI environment handle initialized in object mode.
Raw whose size is returned.
None.