LCOV - code coverage report
Current view: top level - backends/chert - chert_document.cc (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core r Lines: 7 7 100.0 %
Date: 2011-08-21 Functions: 3 3 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       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                 :            : 
      32                 :            : /** Retrieve a value from the database
      33                 :            :  *
      34                 :            :  *  @param slot The value number to retrieve.
      35                 :            :  */
      36                 :            : string
      37                 :      47823 : ChertDocument::do_get_value(Xapian::valueno slot) const
      38                 :            : {
      39                 :            :     LOGCALL(DB, string, "ChertDocument::do_get_value", slot);
      40                 :      47823 :     RETURN(value_manager->get_value(did, slot));
      41                 :            : }
      42                 :            : 
      43                 :            : /** Retrieve all value values from the database
      44                 :            :  */
      45                 :            : void
      46                 :     172477 : ChertDocument::do_get_all_values(map<Xapian::valueno, string> & values_) const
      47                 :            : {
      48                 :            :     LOGCALL_VOID(DB, "ChertDocument::do_get_all_values", values_);
      49                 :     172477 :     value_manager->get_all_values(values_, did);
      50                 :     172477 : }
      51                 :            : 
      52                 :            : /** Retrieve the document data from the database
      53                 :            :  */
      54                 :            : string
      55                 :     151669 : ChertDocument::do_get_data() const
      56                 :            : {
      57                 :            :     LOGCALL(DB, string, "ChertDocument::do_get_data", NO_ARGS);
      58                 :     151669 :     RETURN(record_table->get_record(did));
      59                 :            : }

Generated by: LCOV version 1.8