ChertRecordTable Class Reference

A record in a chert database. More...

#include <chert_record.h>

Inheritance diagram for ChertRecordTable:

Inheritance graph
[legend]
Collaboration diagram for ChertRecordTable:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChertRecordTable (const 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.
void replace_record (const string &data, Xapian::docid did)
void delete_record (Xapian::docid did)
 Delete a record from the table.


Detailed Description

A record in a chert database.

Definition at line 36 of file chert_record.h.


Constructor & Destructor Documentation

ChertRecordTable::ChertRecordTable ( const 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.

Parameters:
path_ - Path at which the table is stored.
readonly_ - whether to open the table for read only access.

Definition at line 50 of file chert_record.h.


Member Function Documentation

void ChertRecordTable::delete_record ( Xapian::docid  did  ) 

Delete a record from the table.

Definition at line 76 of file chert_record.cc.

References ChertTable::del(), LOGCALL_VOID, make_key(), and Xapian::Internal::str().

Referenced by ChertWritableDatabase::delete_document().

Xapian::doccount ChertRecordTable::get_doccount (  )  const

Get the number of records in the table.

Definition at line 56 of file chert_record.cc.

References ChertTable::get_entry_count(), LOGCALL, rare, and RETURN.

Referenced by ChertDatabase::get_avlength(), and ChertDatabase::get_doccount().

string ChertRecordTable::get_record ( Xapian::docid  did  )  const

Retrieve a document from the table.

Definition at line 43 of file chert_record.cc.

References ChertTable::get_exact_entry(), LOGCALL, make_key(), RETURN, and Xapian::Internal::str().

Referenced by ChertDocument::do_get_data().

void ChertRecordTable::replace_record ( const string &  data,
Xapian::docid  did 
)


The documentation for this class was generated from the following files:

Documentation for Xapian (version 1.2.9).
Generated on 10 May 2012 by Doxygen 1.5.9.