Changeset View
Changeset View
Standalone View
Standalone View
src/engine/postingdb.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 42 | public: | |||
---|---|---|---|---|---|
53 | PostingIterator* iter(const QByteArray& term); | 53 | PostingIterator* iter(const QByteArray& term); | ||
54 | PostingIterator* prefixIter(const QByteArray& term); | 54 | PostingIterator* prefixIter(const QByteArray& term); | ||
55 | PostingIterator* regexpIter(const QRegularExpression& regexp, const QByteArray& prefix); | 55 | PostingIterator* regexpIter(const QRegularExpression& regexp, const QByteArray& prefix); | ||
56 | 56 | | |||
57 | enum Comparator { | 57 | enum Comparator { | ||
58 | LessEqual, | 58 | LessEqual, | ||
59 | GreaterEqual | 59 | GreaterEqual | ||
60 | }; | 60 | }; | ||
61 | PostingIterator* compIter(const QByteArray& prefix, const QByteArray& val, Comparator com); | 61 | PostingIterator* compIter(const QByteArray& prefix, qlonglong val, Comparator com); | ||
62 | 62 | | |||
63 | QVector<QByteArray> fetchTermsStartingWith(const QByteArray& term); | 63 | QVector<QByteArray> fetchTermsStartingWith(const QByteArray& term); | ||
64 | 64 | | |||
65 | QMap<QByteArray, PostingList> toTestMap() const; | 65 | QMap<QByteArray, PostingList> toTestMap() const; | ||
66 | private: | 66 | private: | ||
67 | template <typename Validator> | 67 | template <typename Validator> | ||
68 | PostingIterator* iter(const QByteArray& prefix, Validator validate); | 68 | PostingIterator* iter(const QByteArray& prefix, Validator validate); | ||
69 | 69 | | |||
70 | MDB_txn* m_txn; | 70 | MDB_txn* m_txn; | ||
71 | MDB_dbi m_dbi; | 71 | MDB_dbi m_dbi; | ||
72 | }; | 72 | }; | ||
73 | 73 | | |||
74 | 74 | | |||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | #endif // BALOO_POSTINGDB_H | 77 | #endif // BALOO_POSTINGDB_H |