Switch to unified view

a/src/rcldb/rcldb_p.h b/src/rcldb/rcldb_p.h
...
...
34
namespace Rcl {
34
namespace Rcl {
35
35
36
class Query;
36
class Query;
37
37
38
#ifdef IDX_THREADS
38
#ifdef IDX_THREADS
39
// Task for the index update thread. This can be either and add/update
40
// or a purge op, in which case the txtlen is (size_t)-1
39
class DbUpdTask {
41
class DbUpdTask {
40
public:
42
public:
41
    DbUpdTask(const string& ud, const string& un, const Xapian::Document &d,
43
    DbUpdTask(const string& ud, const string& un, const Xapian::Document &d,
42
    size_t tl)
44
    size_t tl)
43
    : udi(ud), uniterm(un), doc(d), txtlen(tl)
45
    : udi(ud), uniterm(un), doc(d), txtlen(tl)
...
...
62
#ifdef IDX_THREADS
64
#ifdef IDX_THREADS
63
    WorkQueue<DbUpdTask*> m_wqueue;
65
    WorkQueue<DbUpdTask*> m_wqueue;
64
    int  m_loglevel;
66
    int  m_loglevel;
65
    PTMutexInit m_mutex;
67
    PTMutexInit m_mutex;
66
    long long  m_totalworkns;
68
    long long  m_totalworkns;
69
    bool m_haveWriteQ;
70
    void maybeStartThreads();
67
#endif // IDX_THREADS
71
#endif // IDX_THREADS
68
72
69
    // Indexing 
73
    // Indexing 
70
    Xapian::WritableDatabase xwdb;
74
    Xapian::WritableDatabase xwdb;
71
    // Querying (active even if the wdb is too)
75
    // Querying (active even if the wdb is too)
72
    Xapian::Database xrdb;
76
    Xapian::Database xrdb;
73
74
    // We sometimes go through the wdb for some query ops, don't
75
    // really know if this makes sense
76
    Xapian::Database& xdb() {return m_iswritable ? xwdb : xrdb;}
77
77
78
    Native(Db *db);
78
    Native(Db *db);
79
    ~Native();
79
    ~Native();
80
80
81
#ifdef IDX_THREADS
81
#ifdef IDX_THREADS