#include <quartz_record.h>
Inheritance diagram for QuartzRecordTable:
Public Member Functions | |
QuartzRecordTable (string path_, bool readonly_) | |
Create a new table object. | |
string | get_record (Xapian::docid did) const |
Retrieve a document from the table. | |
Xapian::doccount | get_doccount () const |
Get the number of records in the table. | |
quartz_totlen_t | get_total_length () const |
Return the total length of all the records in the table. | |
Xapian::docid | get_lastdocid () const |
Get the last document id used. | |
void | set_total_length_and_lastdocid (quartz_totlen_t totlen, Xapian::docid did) |
Set the total length and last document ID used. | |
void | replace_record (const string &data, Xapian::docid did) |
void | delete_record (Xapian::docid did) |
Delete a record from the table. |
Definition at line 38 of file quartz_record.h.
QuartzRecordTable::QuartzRecordTable | ( | 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. | |
blocksize_ | - Size of blocks to use. This parameter is only used when creating the table. |
Definition at line 54 of file quartz_record.h.
string QuartzRecordTable::get_record | ( | Xapian::docid | did | ) | const |
Retrieve a document from the table.
Definition at line 40 of file quartz_record.cc.
References DEBUGCALL, Btree::get_exact_entry(), om_tostring(), quartz_docid_to_key(), and RETURN.
Referenced by QuartzDocument::do_get_data(), and QuartzDocument::QuartzDocument().
Xapian::doccount QuartzRecordTable::get_doccount | ( | ) | const |
Get the number of records in the table.
Definition at line 55 of file quartz_record.cc.
References CASSERT, CASSERT_TYPE_UNSIGNED, DEBUGCALL, Btree::get_entry_count(), and RETURN.
Referenced by QuartzDatabase::get_avlength(), QuartzDatabase::get_doccount(), and QuartzDatabase::QuartzDatabase().
quartz_totlen_t QuartzRecordTable::get_total_length | ( | ) | const |
Return the total length of all the records in the table.
Definition at line 105 of file quartz_record.cc.
References DEBUGCALL, Btree::get_exact_entry(), METAINFO_KEY(), RETURN, unpack_uint(), and unpack_uint_last().
Referenced by QuartzWritableDatabase::cancel(), and QuartzDatabase::get_avlength().
Xapian::docid QuartzRecordTable::get_lastdocid | ( | ) | const |
Get the last document id used.
Definition at line 69 of file quartz_record.cc.
References DEBUGCALL, Btree::get_exact_entry(), METAINFO_KEY(), RETURN, and unpack_uint().
Referenced by QuartzDatabase::get_lastdocid(), and QuartzDatabase::QuartzDatabase().
void QuartzRecordTable::set_total_length_and_lastdocid | ( | quartz_totlen_t | totlen, | |
Xapian::docid | did | |||
) |
Set the total length and last document ID used.
Definition at line 94 of file quartz_record.cc.
References DEBUGCALL, METAINFO_KEY(), pack_uint(), and pack_uint_last().
Referenced by QuartzDatabase::create_and_open_tables(), QuartzWritableDatabase::do_flush_const(), and QuartzDatabase::QuartzDatabase().
void QuartzRecordTable::replace_record | ( | const string & | data, | |
Xapian::docid | did | |||
) |
Definition at line 86 of file quartz_record.cc.
References DEBUGCALL, and quartz_docid_to_key().
Referenced by QuartzWritableDatabase::add_document_(), and QuartzWritableDatabase::replace_document().
void QuartzRecordTable::delete_record | ( | Xapian::docid | did | ) |
Delete a record from the table.
Definition at line 126 of file quartz_record.cc.
References DEBUGCALL, Btree::del(), om_tostring(), and quartz_docid_to_key().
Referenced by QuartzWritableDatabase::delete_document().