From f57dca821e2a33783ec0dd0af2f5c31daef4fa64 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Thu, 4 Dec 2014 19:23:09 +0100 Subject: kyoto! --- store/database.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'store/database.h') diff --git a/store/database.h b/store/database.h index 2bf0556..e752ff5 100644 --- a/store/database.h +++ b/store/database.h @@ -7,17 +7,20 @@ class Database { public: enum TransactionType { ReadOnly, ReadWrite }; - Database(const QString &path); + Database(const QString &storageRoot, const QString &name); ~Database(); bool isInTransaction() const; bool startTransaction(TransactionType type = ReadWrite); bool commitTransaction(); void abortTransaction(); + bool write(const char *key, size_t keySize, const char *value, size_t valueSize); bool write(const std::string &sKey, const std::string &sValue); //Perhaps prefer iterators (assuming we need to be able to match multiple values void read(const std::string &sKey, const std::function &); void read(const std::string &sKey, const std::function &); + qint64 diskUsage() const; + void removeFromDisk() const; private: class Private; Private * const d; -- cgit v1.2.3