Akonadi::Search::XapianDatabase

Search for usage in LXR

Akonadi::Search::XapianDatabase Class Reference

#include <xapiandatabase.h>

Public Member Functions

 XapianDatabase (const QString &path, bool writeOnly=false)
 
void commit ()
 
Xapian::Database * db ()
 
void deleteDocument (uint id)
 
XapianDocument document (uint id)
 
bool haveChanges () const
 
void replaceDocument (uint id, const Xapian::Document &doc)
 
void replaceDocument (uint id, const XapianDocument &doc)
 

Detailed Description

Xapian database.

Definition at line 24 of file xapiandatabase.h.

Constructor & Destructor Documentation

◆ XapianDatabase()

XapianDatabase::XapianDatabase ( const QString & path,
bool writeOnly = false )
explicit

Create the Xapian db at path path.

The parameter writeOnly locks the database as long as this object is valid

Definition at line 23 of file xapiandatabase.cpp.

◆ ~XapianDatabase()

XapianDatabase::~XapianDatabase ( )

Definition at line 45 of file xapiandatabase.cpp.

Member Function Documentation

◆ commit()

void XapianDatabase::commit ( )

Commit all the pending changes.

This may not commit at this instance as the db might be locked by another process It emits the committed signal on completion

Definition at line 88 of file xapiandatabase.cpp.

◆ db()

Xapian::Database * Akonadi::Search::XapianDatabase::db ( )
inline

A pointer to the actual db.

Only use this when doing queries

Definition at line 51 of file xapiandatabase.h.

◆ deleteDocument()

void XapianDatabase::deleteDocument ( uint id)

Definition at line 67 of file xapiandatabase.cpp.

◆ document()

XapianDocument XapianDatabase::document ( uint id)

Definition at line 137 of file xapiandatabase.cpp.

◆ haveChanges()

bool XapianDatabase::haveChanges ( ) const

Returns true if the XapianDatabase has changes which need to be committed.

Definition at line 83 of file xapiandatabase.cpp.

◆ replaceDocument() [1/2]

void XapianDatabase::replaceDocument ( uint id,
const Xapian::Document & doc )

Definition at line 55 of file xapiandatabase.cpp.

◆ replaceDocument() [2/2]

void XapianDatabase::replaceDocument ( uint id,
const XapianDocument & doc )

Definition at line 50 of file xapiandatabase.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.