#include <db.h> int DB->sort_multiple(DB *db, DBT *key, DBT *data, u_int32_t flags);
The DB->sort_multiple()
method is used
to sort a set of DBTs into
database insert order.
If specified the application specific btree comparison and duplicate comparison functions will be used if they are configured.
The key and data parameters must contain pairs of items. That is the n-th entry in key must correspond to the n-th entry in data.
The DB->sort_multiple()
method returns a non-zero error value on failure and 0 on success.
The key parameter must contain a set of DBT entries in DB_MULTIPLE or DB_MULTIPLE_KEY format.
The sorted entries will be returned in the key parameter.
If non-NULL, the data parameter must contain a set of DBTs entries in DB_MULTIPLE format. Each entry must correspond to an entry in the key parameter.
The flags parameter must be set to one of the following values:
Sorts one or two DB_MULTIPLE format DBTs. Assumes that key and data specify pairs of key and data items to sort together. If the data parameter is NULL the API will sort the key arrays according to the btree comparison function.
Sorts a DB_MULTIPLE_KEY format DBT.
The DB->sort_multiple()
method may fail and return one of the following non-zero errors: