5I2Berkeley DB: DbInfo::set_bt_compare[P

DbInfo::set_bt_compare





#include <db_cxx.h>

8typedef int (*bt_compare_fcn)(const DBT *, const DBT *);,void DbInfo::set_bt_compare(bt_compare_fcn);





Description

&Set the Btree key comparison function.DThis comparison function must return an integer less than, equal to,Bor greater than zero if the first key argument is considered to beJrespectively less than, equal to, or greater than the second key argument.EThe same comparison method must be used on a given tree every time it is opened.

iThe data and size fields of the Dbt are the only<fields that may be used for the purposes of this comparison.

HIf no comparison function is specified, the keys are compared lexically,/with shorter keys collating before longer keys.



Class

4DbInfo



See Also

DbInfo::set_bt_compare,LDbInfo::set_bt_maxkey,LDbInfo::set_bt_minkey,LDbInfo::set_bt_prefix,LDbInfo::set_cachesize,HDbInfo::set_compare,DDbInfo::set_flags,LDbInfo::set_h_ffactor,FDbInfo::set_h_hash,HDbInfo::set_h_nelem,FDbInfo::set_lorder,FDbInfo::set_malloc,JDbInfo::set_pagesize,JDbInfo::set_re_delim,FDbInfo::set_re_len,EDbInfo::set_re_padandLDbInfo::set_re_source.
ÿÿ