qdb_query()

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), then you can improve performance by specifying that value in the size_hint. 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 qdb_getresult(), and offers a potential performance improvement if the statement and result communication can be made with a single context switch.

Returns:

0
Success.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

qdb_statement(), qdb_getresult()