|
xapian-core
2.0.0
|
#include <honey_cursor.h>
Inheritance diagram for HoneyCursor:
Collaboration diagram for HoneyCursor:Public Member Functions | |
| HoneyCursor (const HoneyTable *table) | |
| HoneyCursor (const HoneyCursor &o) | |
| void | rewind () |
| Position cursor on the dummy empty key. More... | |
| void | to_end () |
| bool | after_end () const |
| bool | next () |
| bool | read_tag (bool keep_compressed=false) |
| bool | find_exact (std::string_view key) |
| bool | find_entry_ge (std::string_view key) |
| bool | prev () |
| Move to the item before the current one. More... | |
Public Attributes | |
| std::string | current_key |
| std::string | current_tag |
| size_t | val_size = 0 |
| bool | current_compressed = false |
| CompressionStream | comp_stream |
| bool | is_at_end = false |
| std::string | last_key |
| off_t | root |
| off_t | offset |
Private Member Functions | |
| bool | do_find (std::string_view key, bool greater_than) |
| Search for key. More... | |
| bool | do_next () |
| bool | next_from_index () |
| Handle the value part of the (key,value). More... | |
Private Attributes | |
| BufferedFile | store |
Definition at line 26 of file honey_cursor.h.
|
inlineexplicit |
Definition at line 57 of file honey_cursor.h.
References offset, BufferedFile::set_pos(), and store.
|
inline |
Definition at line 66 of file honey_cursor.h.
References BufferedFile::get_pos(), BufferedFile::set_pos(), and store.
|
inline |
Definition at line 94 of file honey_cursor.h.
References is_at_end.
Referenced by HoneyAllDocsPostList::check(), do_until(), main(), HoneyMetadataTermList::next(), HoneyAllDocsPostList::next(), show_entry(), HoneyMetadataTermList::skip_to(), HoneyAllDocsPostList::skip_to(), and HoneyPostList::skip_to().
|
private |
Search for key.
If key isn't present, the behaviour depends on greater_than. If it's true, then the cursor will be left on the first key > key; otherwise it may be left at an unspecified position.
Definition at line 170 of file honey_cursor.cc.
References Assert, description_append(), p, SSTINDEX_BINARY_CHOP_ENTRY_SIZE, SSTINDEX_BINARY_CHOP_KEY_SIZE, Xapian::Internal::str(), HoneyTable::throw_database_closed(), and unpack_uint().
Referenced by find_entry_ge(), and find_exact().
|
private |
Definition at line 37 of file honey_cursor.cc.
References Assert, AssertEq, and description_append().
Referenced by next().
|
inline |
Definition at line 110 of file honey_cursor.h.
References do_find().
Referenced by HoneyAllDocsPostList::check(), HoneyDatabase::get_doclength(), main(), HoneyMetadataTermList::next(), HoneyMetadataTermList::skip_to(), HoneyAllDocsPostList::skip_to(), and HoneyPostList::skip_to().
|
inline |
Definition at line 106 of file honey_cursor.h.
References do_find().
|
inline |
Definition at line 96 of file honey_cursor.h.
References do_next(), store, HoneyTable::throw_database_closed(), and BufferedFile::was_forced_closed().
Referenced by MutableHoneyCursor::del(), do_until(), main(), HoneyCompact::merge_docid_keyed(), HoneyCompact::PostlistCursor< const HoneyTable & >::next(), HoneyCompact::PositionCursor< const HoneyTable & >::next(), HoneyMetadataTermList::next(), HoneyAllDocsPostList::next(), and HoneyPostList::next().
|
private |
Handle the value part of the (key,value).
Definition at line 90 of file honey_cursor.cc.
References p, and unpack_uint().
| bool HoneyCursor::prev | ( | ) |
Move to the item before the current one.
If the cursor is after_end(), this moves to the last item.
If the cursor is at the start of the table (on the empty key), do nothing and return false, otherwise return true.
This method may not be particularly efficient.
Definition at line 387 of file honey_cursor.cc.
References HONEY_MAX_KEY_LENGTH, pos, and HoneyTable::throw_database_closed().
Referenced by main().
| bool HoneyCursor::read_tag | ( | bool | keep_compressed = false | ) |
Definition at line 127 of file honey_cursor.cc.
References description_append(), and HoneyTable::throw_database_closed().
Referenced by HoneyPostList::HoneyPostList(), HoneyCompact::merge_docid_keyed(), show_entry(), and Honey::DocLenChunkReader::update().
|
inline |
Position cursor on the dummy empty key.
Calling next() after this moves the cursor to the first entry.
Definition at line 85 of file honey_cursor.h.
References current_key, is_at_end, last_key, offset, BufferedFile::set_pos(), store, and val_size.
Referenced by main(), and HoneyCompact::merge_docid_keyed().
|
inline |
Definition at line 92 of file honey_cursor.h.
References is_at_end.
Referenced by HoneyMetadataTermList::HoneyMetadataTermList(), HoneySpellingWordsList::HoneySpellingWordsList(), HoneySynonymTermList::HoneySynonymTermList(), and main().
|
mutable |
Definition at line 46 of file honey_cursor.h.
| bool HoneyCursor::current_compressed = false |
Definition at line 45 of file honey_cursor.h.
| std::string HoneyCursor::current_key |
Definition at line 43 of file honey_cursor.h.
Referenced by MutableHoneyCursor::del(), do_until(), HoneyCompact::merge_docid_keyed(), HoneyMetadataTermList::next(), rewind(), show_entry(), HoneyMetadataTermList::skip_to(), and Honey::DocLenChunkReader::update().
| std::string HoneyCursor::current_tag |
Definition at line 43 of file honey_cursor.h.
Referenced by HoneyPostList::HoneyPostList(), HoneyCompact::merge_docid_keyed(), show_entry(), and Honey::DocLenChunkReader::update().
| bool HoneyCursor::is_at_end = false |
Definition at line 47 of file honey_cursor.h.
Referenced by after_end(), MutableHoneyCursor::del(), rewind(), and to_end().
|
mutable |
Definition at line 48 of file honey_cursor.h.
Referenced by rewind().
| off_t HoneyCursor::offset |
Definition at line 54 of file honey_cursor.h.
Referenced by HoneyCursor(), and rewind().
| off_t HoneyCursor::root |
Definition at line 51 of file honey_cursor.h.
|
private |
Definition at line 40 of file honey_cursor.h.
Referenced by HoneyCursor(), next(), and rewind().
|
mutable |
Definition at line 44 of file honey_cursor.h.
Referenced by rewind().