Change the runtime configuration of a user-defined collation sequence
#include <qdb/qdb.h> int qdb_collation_ext( qdb_hdl_t *db, void *data, int nbytes, int reindex );
This function configures a specific user-defined collation sequence registered for a database. To be registered, this sequence must be listed under the Collation option in the database's configuration object. The setup() function of the collation is invoked with the specified data and nbytes, and any error raised by that function is returned to the client.
The data argument contains the setup data as well as the collation name, with both items separated by an AT sign (@). The format of the setup data is based on the implementation of the setup function. Thus, you can use any data format so long as it's supported by the named collation sequence. For example, you can pass zh_CN as data to the icu collation by passing zh_CN@icu into data.
You can include @ characters in the data. If you do, QDB looks for the last @ and treats this as the delimiter marking the start of the collation name. So you could also provide the following data to the icu collation, with this data argument: zh@collation=pinyin@icu
If you don't provide any data and name only the routine (e.g., by providing a data value of icu), QDB resets the collation to its default setting. For details on implementing setup functions, which read this data to configure collation routines, see Collation routines.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |