qdb_cell_type()

Return a cell's datatype

Synopsis:

#include <qdb/qdb.h>

int qdb_cell_type( qdb_result_t *res, int row, int col ); 

Arguments:

res
A pointer to a result structure to check.
row
The row number of the cell, where the first row is 0.
col
The column number of the cell, where the first column is 0.

Library:

qdb

Description:

This function returns the type of the specified cell, which you can use to cast the cell data to the proper C datatype. The datatypes that can be returned are defined in <qdb/qdb.h>:

Return Type ANSI C Type Variable Length
QDB_UNSUPPORTED NULL No
QDB_INTEGER int64_t No
QDB_REAL double No
QDB_TEXT char * Yes
QDB_BLOB void * Yes
QDB_NULL NULL No

If the data can have variable length, you should check its length by calling qdb_cell_length(). The QDB_TEXT type (char *) is always null-terminated.

Returns:

>=0
The datatype of the specified cell.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes