diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-15 09:05:58 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-15 09:05:58 +0100 |
commit | 2f504b6f264c90ded6b0226a565301da97d3918f (patch) | |
tree | b74cc605b1620729718e3e1a512fda35793d9259 /common/storage.h | |
parent | 1ec122d6579a6f1850753a2b72ae04d4bd9981a0 (diff) | |
download | sink-2f504b6f264c90ded6b0226a565301da97d3918f.tar.gz sink-2f504b6f264c90ded6b0226a565301da97d3918f.zip |
Added a way to gather some db statistics.
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/storage.h b/common/storage.h index a4137ce..22bf06c 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -106,6 +106,8 @@ public: | |||
106 | return (d != nullptr); | 106 | return (d != nullptr); |
107 | } | 107 | } |
108 | 108 | ||
109 | qint64 getSize(); | ||
110 | |||
109 | private: | 111 | private: |
110 | friend Transaction; | 112 | friend Transaction; |
111 | NamedDatabase(NamedDatabase& other); | 113 | NamedDatabase(NamedDatabase& other); |
@@ -123,6 +125,8 @@ public: | |||
123 | bool commit(const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); | 125 | bool commit(const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); |
124 | void abort(); | 126 | void abort(); |
125 | 127 | ||
128 | QList<QByteArray> getDatabaseNames() const; | ||
129 | |||
126 | NamedDatabase openDatabase(const QByteArray &name = QByteArray("default"), const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>(), bool allowDuplicates = false) const; | 130 | NamedDatabase openDatabase(const QByteArray &name = QByteArray("default"), const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>(), bool allowDuplicates = false) const; |
127 | 131 | ||
128 | Transaction(Transaction&& other) : d(other.d) | 132 | Transaction(Transaction&& other) : d(other.d) |