Add db->get_last_key() and test.