Changeset View
Changeset View
Standalone View
Standalone View
src/engine/transaction.h
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 44 | public: | |||
---|---|---|---|---|---|
90 | QVector<QByteArray> documentXattrTerms(quint64 docId) const; | 90 | QVector<QByteArray> documentXattrTerms(quint64 docId) const; | ||
91 | 91 | | |||
92 | DatabaseSize dbSize(); | 92 | DatabaseSize dbSize(); | ||
93 | 93 | | |||
94 | // | 94 | // | ||
95 | // Transaction handling | 95 | // Transaction handling | ||
96 | // | 96 | // | ||
97 | void commit(); | 97 | void commit(); | ||
98 | void abort(); | 98 | void abortTransaction(); | ||
99 | bool hasChanges() const; | 99 | bool hasChanges() const; | ||
100 | 100 | | |||
101 | // | 101 | // | ||
102 | // Write Methods | 102 | // Write Methods | ||
103 | // | 103 | // | ||
104 | void addDocument(const Document& doc); | 104 | void addDocument(const Document& doc); | ||
105 | void removeDocument(quint64 id); | 105 | void removeDocument(quint64 id); | ||
106 | void removeRecursively(quint64 parentId); | 106 | void removeRecursively(quint64 parentId); | ||
Show All 15 Lines | |||||
122 | void checkFsTree(); | 122 | void checkFsTree(); | ||
123 | void checkTermsDbinPostingDb(); | 123 | void checkTermsDbinPostingDb(); | ||
124 | void checkPostingDbinTermsDb(); | 124 | void checkPostingDbinTermsDb(); | ||
125 | 125 | | |||
126 | private: | 126 | private: | ||
127 | Transaction(const Transaction& rhs) = delete; | 127 | Transaction(const Transaction& rhs) = delete; | ||
128 | 128 | | |||
129 | const DatabaseDbis& m_dbis; | 129 | const DatabaseDbis& m_dbis; | ||
130 | MDB_txn* m_txn; | 130 | MDB_txn *m_txn = nullptr; | ||
131 | MDB_env* m_env; | 131 | MDB_env *m_env = nullptr; | ||
132 | WriteTransaction* m_writeTrans; | 132 | WriteTransaction *m_writeTrans = nullptr; | ||
133 | 133 | | |||
134 | friend class DatabaseSanitizerImpl; | 134 | friend class DatabaseSanitizerImpl; | ||
135 | friend class DBState; // for testing | 135 | friend class DBState; // for testing | ||
136 | }; | 136 | }; | ||
137 | } | 137 | } | ||
138 | 138 | | |||
139 | #endif // BALOO_TRANSACTION_H | 139 | #endif // BALOO_TRANSACTION_H |