Closed Zener131 closed 5 years ago
Hello, As you have concluded, this depends on the underlying storage engine. Since the default is hash based, it support only exact O(1) lookup. Other storage engine were ordered traversal are supported like B+Tree, R+Tree should implement LE, GE search!
Hello. Using unqlite_kv_cursor_seek() with a partial so unexisting key but matching part of existing ones, and using UNQLITE_CURSOR_MATCH_LE (or _GE) should lead to find one, as the doc says. It fails. Actually, tracing shows that the method xSeek() used is the lhCursorSeek(), which does a "exact" search and just ignores the argument 'iPos'. Yes it looks logical for a hash-based storage, but as the doc says, the tree-based alternatives available are restricted to memory-only databases. What appears to mean that there is no solution for a database stored in a file and using ordered keys ??? This would dramatically reduce the interest of using it, I really hope the doc is out of date on this point... Can you please clarify ? Thank you, best regards.