qdb_collation()

Change the runtime configuration of user-defined collation sequences

Synopsis:

#include <qdb/qdb.h>

int qdb_collation( qdb_hdl_t *db,
                   void *data,
                   int nbytes,
                   int reindex );

Arguments:

db
A pointer to the database handle.
data
A pointer to arbitrary configuration data used by the user-defined collation library.
nbytes
The length of data, in bytes.
reindex
A flag to indicate if QDB should reindex any database indexes that would be affected by changing the collation. If any indexes exist that have a COLLATE component, then these must be regenerated to reflect the potentially new sorting order.

Library:

qdb

Description:

This function configures user-defined collation sequences attached to the database. These collation sequences are listed under the Collation option in the database configuration object. The setup() function of each entry is invoked with the specified data and nbytes, and any error raised by that function is returned to the client. Otherwise, the collation routine is expected to use the data in a proprietary manner to configure itself to a new sort order. The collation routine and the client must both know what format this configuration data is in. You can consider strings as a simple self-documenting extensible format (e.g. getsubopt() style).

Returns:

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

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes