June 2001
Intermediate to advanced
688 pages
19h 18m
English
import com.sleepycat.db.*; public interface DbDupCompare { public abstract int dup_compare(Db db, Dbt dbt1, Dbt dbt2); } public class Db { public void set_dup_compare(DbDupCompare dup_compare) throws DbException; ... }
Set the duplicate data item comparison function. The comparison function is called when it is necessary to compare a data item specified by the application with a data item currently stored in the tree. The first argument to the comparison function is the Dbt representing the application’s data item, the second is the current tree’s data item.
The comparison function must return an integer value less than, equal to, or greater than zero if the first data item argument is considered to be respectively ...