Using a result
A result is a block of memory containing a description of each cell and the cell's data.
There are several API functions for accessing the result data:
| Function Name | Use |
|---|---|
| qdb_columns() | Returns the number of columns |
| qdb_rows() | Returns the number of rows; an empty result returns 0 |
| qdb_cell_type() | Returns the type of data in a cell |
| qdb_column_name() | Gets the column name from the database schema |
| qdb_cell() | Returns the cell data as a void* pointer that can be cast to the correct type |
| qdb_column_index() | Gets the column number that matches the passed-in name |
| qdb_cell_length() | Returns the length of a cell's data |
| qdb_printmsg() | Prints the contents of a result, which can be useful for debugging |
Page updated:
