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