xapian-core  1.4.26
chert_document.cc
Go to the documentation of this file.
1 /* chert_document.cc: Implementation of document for Chert database
2  *
3  * Copyright 1999,2000,2001 BrightStation PLC
4  * Copyright 2002 Ananova Ltd
5  * Copyright 2003,2004,2008 Olly Betts
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
20  * USA
21  */
22 
23 #include <config.h>
24 
25 #include "chert_document.h"
26 
27 #include "debuglog.h"
28 #include "chert_database.h"
29 #include "chert_values.h"
30 #include "chert_record.h"
31 
36 string
38 {
39  LOGCALL(DB, string, "ChertDocument::do_get_value", slot);
41 }
42 
45 void
46 ChertDocument::do_get_all_values(map<Xapian::valueno, string> & values_) const
47 {
48  LOGCALL_VOID(DB, "ChertDocument::do_get_all_values", values_);
49  value_manager->get_all_values(values_, did);
50 }
51 
54 string
56 {
57  LOGCALL(DB, string, "ChertDocument::do_get_data", NO_ARGS);
59 }
#define RETURN(A)
Definition: debuglog.h:493
Records in chert databases.
Xapian::docid did
The document ID of the document in that database.
Definition: document.h:90
std::string get_value(Xapian::docid did, Xapian::valueno slot) const
A document read from a ChertDatabase.
void get_all_values(std::map< Xapian::valueno, std::string > &values, Xapian::docid did) const
#define LOGCALL_VOID(CATEGORY, FUNC, PARAMS)
Definition: debuglog.h:488
void do_get_all_values(map< Xapian::valueno, string > &values_) const
Retrieve all value values from the database.
const ChertRecordTable * record_table
Used for lazy access to document data.
ChertValueManager class.
C++ class definition for chert database.
unsigned valueno
The number for a value slot in a document.
Definition: types.h:108
string get_record(Xapian::docid did) const
Retrieve a document from the table.
Definition: chert_record.cc:43
string do_get_value(Xapian::valueno slot) const
Implementation of virtual methods.
const ChertValueManager * value_manager
Used for lazy access to document values.
string do_get_data() const
Retrieve the document data from the database.
Debug logging macros.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
Definition: debuglog.h:487