Perform a database query
Synopsis:
#include <qdb/qdb.h>
qdb_result_t *qdb_query( qdb_hdl_t *db,
int size_hint,
const char *fmt, ... );
Arguments:
- db
- A pointer to the database handle.
- size_hint
- An estimate (in bytes) of how much memory to initially allocate to receive the database result.
Specifying a value of 0 will use a default initial setting. If you know the rough order of magnitude of the result
in advance (either very small or very large), you can improve performance by specifying that value. In all cases,
the full result will be received.
- fmt
- A string that controls the format of the output, as described in qdb_statement().
Library:
qdb
Description:
This convenience function provides a single-interface alternative to calling qdb_statement() and then qdb_getresult(). It also offers a performance improvement if the statement and result
communication can be made with a single context switch.
Returns:
A valid pointer to a qdb_result_t structure, or NULL if an error
occurs (errno is set).
Classification:
QNX Neutrino
Safety: |
|
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |