June 2001
Intermediate to advanced
688 pages
19h 18m
English
import com.sleepycat.db.*; public interface DbBtreePrefix { public abstract int bt_prefix(Db db, Dbt dbt1, Dbt dbt2); } public class Db { public void set_bt_prefix(DbBtreePrefix bt_prefix) throws DbException; ... }
Set the Btree prefix function. The prefix function must return the number of bytes of the second key argument that would be required by the Btree key comparison function to determine the second key argument’s ordering relationship with respect to the first key argument. If the two keys are equal, the key length should be returned. The prefix function must correctly handle any key values used by the application (possibly including zero-length keys). The data and size fields of the Dbt are the only fields ...