1I.Berkeley DB: DbInfo::set_h_hash[P

DbInfo::set_h_hash





#include <db_cxx.h>

9typedef u_int32_t (*h_hash_fcn)(const void *, u_int32_t);$void DbInfo::set_h_hash(h_hash_fcn);





Description

?Set a user defined hash method; if no hash method is specified,a default hash method is used.@Since no hash method performs equally well on all possible data,Dthe user may find that the built-in hash method performs poorly witha particular data set.FUser specified hash functions must take a pointer to a byte string andBa length as arguments and return a value of type u_int32_t.

IIf a hash method is specified, hash_open will attempt to determineKif the hash method specified is the same as the one with which the database8was created, and will fail if it detects that it is not.



Class

4DbInfo



See Also

NDbInfo::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,DbInfo::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.
ÿÿ