qdb_collation()

(Deprecated) Change the runtime configuration of all 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. This data must be in the format expected by the collation setup functions.
This argument may be NULL, to make QDB reset all collations to their default settings.
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 collations. If any indexes exist that have a COLLATE component, then these must be regenerated to reflect the potentially new sorting order.

Library:

qdb

Description:

Note: This function is deprecated. You should instead call qdb_collation_ext() to configure the data for individual collation routines.

This function configures all user-defined collation sequences registered for a database. The registered sequences are those listed under the Collation option in the database's configuration object. The setup() function of each collation is invoked with the specified data and nbytes, and any error raised by that function is returned to the client.

The format of the data argument is custom and is based on the implementation of the setup functions. Thus, you can use any data format so long as it's supported by each collation sequence. For instance, you can use strings that store data in a self-documenting format, such as lang=en_US.

If you set data to NULL, QDB resets all collations to their default settings. For details on implementing setup functions, which read this data to configure collation routines, see Collation routines.

Returns:

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

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes