#include <flint_values.h>
Inheritance diagram for FlintValueTable:
Public Member Functions | |
FlintValueTable (string path_, bool readonly_) | |
Create a new table object. | |
void | encode_values (string &s, Xapian::ValueIterator it, const Xapian::ValueIterator &end) |
Encode values as a string ready to add to the table. | |
void | set_encoded_values (Xapian::docid did, const string &enc) |
Set values for document did encoded as a string. | |
void | get_value (string &value, Xapian::docid did, Xapian::valueno valueno) const |
Get a value. | |
void | get_all_values (map< Xapian::valueno, string > &values, Xapian::docid did) const |
Get all values. | |
void | delete_all_values (Xapian::docid did) |
Remove all values. | |
Static Private Member Functions | |
static void | unpack_entry (const char **pos, const char *end, Xapian::valueno *this_value_no, string &this_value) |
Read an entry from position. |
Definition at line 35 of file flint_values.h.
FlintValueTable::FlintValueTable | ( | string | path_, | |
bool | readonly_ | |||
) | [inline] |
Create a new table object.
This does not create the table on disk - the create() method must be called before the table is created on disk
This also does not open the table - the open() method must be called before use is made of the table.
path_ | - Path at which the table is stored. | |
readonly_ | - whether to open the table for read only access. |
Definition at line 58 of file flint_values.h.
void FlintValueTable::unpack_entry | ( | const char ** | pos, | |
const char * | end, | |||
Xapian::valueno * | this_value_no, | |||
string & | this_value | |||
) | [static, private] |
Read an entry from position.
Throw appropriate exceptions if data runs out.
Definition at line 44 of file flint_values.cc.
References DEBUGCALL_STATIC, DEBUGLINE, unpack_string(), and unpack_uint().
Referenced by get_all_values(), and get_value().
void FlintValueTable::encode_values | ( | string & | s, | |
Xapian::ValueIterator | it, | |||
const Xapian::ValueIterator & | end | |||
) |
Encode values as a string ready to add to the table.
Definition at line 66 of file flint_values.cc.
References DEBUGCALL, Xapian::ValueIterator::get_valueno(), pack_string(), and pack_uint().
Referenced by FlintWritableDatabase::add_document_(), and FlintWritableDatabase::replace_document().
void FlintValueTable::set_encoded_values | ( | Xapian::docid | did, | |
const string & | enc | |||
) |
Set values for document did encoded as a string.
Definition at line 79 of file flint_values.cc.
References DEBUGCALL, and make_key().
Referenced by FlintWritableDatabase::add_document_(), and FlintWritableDatabase::replace_document().
void FlintValueTable::get_value | ( | string & | value, | |
Xapian::docid | did, | |||
Xapian::valueno | valueno | |||
) | const |
Get a value.
Definition at line 88 of file flint_values.cc.
References DEBUGCALL, FlintTable::get_exact_entry(), make_key(), and unpack_entry().
Referenced by FlintDocument::do_get_value().
void FlintValueTable::get_all_values | ( | map< Xapian::valueno, string > & | values, | |
Xapian::docid | did | |||
) | const |
Get all values.
values | A map to be filled with all the values for the specified document. |
Definition at line 121 of file flint_values.cc.
References DEBUGCALL, FlintTable::get_exact_entry(), make_key(), and unpack_entry().
Referenced by FlintDocument::do_get_all_values().
void FlintValueTable::delete_all_values | ( | Xapian::docid | did | ) |
Remove all values.
did | The document id for which to remove the values. |
Definition at line 146 of file flint_values.cc.
References DEBUGCALL, FlintTable::del(), and make_key().
Referenced by FlintWritableDatabase::delete_document(), and FlintWritableDatabase::replace_document().