small fixes for extra db selection

This commit is contained in:
dockes
2006-04-05 13:39:07 +00:00
parent a2509fa445
commit c11a64f8a3
5 changed files with 71 additions and 28 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.61 2006-04-05 12:50:42 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.62 2006-04-05 13:39:07 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -237,6 +237,13 @@ bool Db::open(const string& dir, OpenMode mode, int qops)
return false;
}
string Db::getDbDir()
{
if (m_ndb == 0)
return "";
return m_ndb->m_basedir;
}
// Note: xapian has no close call, we delete and recreate the db
bool Db::close()
{
+2 -1
View File
@@ -16,7 +16,7 @@
*/
#ifndef _DB_H_INCLUDED_
#define _DB_H_INCLUDED_
/* @(#$Id: rcldb.h,v 1.29 2006-04-05 12:50:42 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: rcldb.h,v 1.30 2006-04-05 13:39:07 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
#include <list>
@@ -181,6 +181,7 @@ class Db {
/** Get a list of existing stemming databases */
std::list<std::string> getStemLangs();
string getDbDir();
private:
AdvSearchData m_asdata;