Instances of the class IldAppDescriptor
hold the description of a column or a parameter, the size of the data buffer, and the addresses of the data and null
indicator buffers.
More...
#include <ildblink/ildtuple.h>
Public Member Functions | |
IlUInt | getBufferSize () const |
Get the maximum size of the values. More... | |
short * | getNulls () const |
Get the null indicators buffer. More... | |
char * | getValue (IlUInt r=0) const |
Get the value buffer. More... | |
IlBoolean | isExtNulls () const |
Tell if the null indicators buffer is externally allocated. More... | |
IlBoolean | isExtValue () const |
Tell if the buffer is externally managed. More... | |
void | setBufferSize (IlUInt size) |
Set the actual size of the values buffer. More... | |
void | setNulls (short *nulls, IlBoolean ext=IlFalse) |
Change the null -indicators buffer of the descriptor. More... | |
void | setValue (char *v, IlBoolean ext=IlFalse) |
Change the data buffer of the descriptor. More... | |
Public Member Functions inherited from IldDescriptor | |
IldADTDescriptor * | getADTDescriptor () const |
Get the abstract data type descriptor. More... | |
const char * | getName () const |
Get the name of the described object. More... | |
short | getPrecision () const |
Get the precision of the described object. More... | |
short | getScale () const |
Get the scale of the described object. More... | |
IlUInt | getSize () const |
Get the maximum data size of the described object. More... | |
short | getSqlType () const |
Get the SQL type of the decribed object. More... | |
const char * | getSqlTypeName () const |
Get the SQL type name of the described object. More... | |
IldColumnType | getType () const |
Get the type of the described object. More... | |
IlBoolean | isNullable () const |
Indicates whether or not the column can contain values that are NULL in the RDBMS sense. | |
Instances of the class IldAppDescriptor
hold the description of a column or a parameter, the size of the data buffer, and the addresses of the data and null
indicator buffers.
Library: dbkernel
The descriptors of a result set are built during the parse step if the statement is prepared, or during the execute step if the statement is executed immediately (see the member functions IldRequest::parse
and IldRequest::execute
).
The descriptors of a parameters set are built at bind time for RDBMSs that do not have the "describe parameter" capability, and at prepare time for the other RDBMSs (see the member functions IldRequest::bindParam
and IldRequest::parse
).
IlUInt IldAppDescriptor::getBufferSize | ( | ) | const |
Get the maximum size of the values.
short * IldAppDescriptor::getNulls | ( | ) | const |
Get the null indicators buffer.
null
-indicators buffer.char* IldAppDescriptor::getValue | ( | IlUInt | r = 0 | ) | const |
Get the value buffer.
r | The row index. |
IlBoolean IldAppDescriptor::isExtNulls | ( | ) | const |
Tell if the null indicators buffer is externally allocated.
IlFalse
if the null
-indicators buffer was allocated by DB Link, or IlTrue
if the buffer was allocated by an external application.IlBoolean IldAppDescriptor::isExtValue | ( | ) | const |
Tell if the buffer is externally managed.
IlFalse
if the values buffer was allocated by DB Link, or IlTrue
if the buffer was allocated by an external application.void IldAppDescriptor::setBufferSize | ( | IlUInt | size | ) |
Set the actual size of the values buffer.
size | The maximum size, in bytes, of the data for one value. |
The application must ensure that the parameter size is not smaller than the actual size of the buffer. While this function will accept such a value, the error ILD_BAD_VARIABLE_SIZE
could be raised at bind time.
If the buffer size is changed after bindings have been processed or in between fetches, the behavior of the application is unpredictable.
Change the null
-indicators buffer of the descriptor.
nulls | The new null indicators buffer. |
ext | Optionally, is the buffer externally managed or managed by DB Link. |
The second argument ext specifies the owner of the allocated buffer as follows:
IlFalse
, IlTrue
. In this case, the buffer will not be deleted by DB Link when requests are cleaned up or deleted. Change the data buffer of the descriptor.
v | The new buffer to be used to store data. |
ext | Optionally, is the buffer externally managed or managed by DB Link. |
The second argument ext specifies the owner of the allocated buffer as follows:
IlFalse
. IlTrue
. In this case, the buffer will not be deleted by DB Link when requests are cleaned up or deleted.