Mercurial > hg > orthanc
comparison OrthancServer/DatabaseWrapper.h @ 1615:c40fe92a68e7
Primitives to upgrade the database version in plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Sep 2015 15:18:59 +0200 |
parents | 0586ed8897f1 |
children | 0c58f189782d |
comparison
equal
deleted
inserted
replaced
1614:1c9e99d2bfd2 | 1615:c40fe92a68e7 |
---|---|
53 { | 53 { |
54 private: | 54 private: |
55 IDatabaseListener* listener_; | 55 IDatabaseListener* listener_; |
56 SQLite::Connection db_; | 56 SQLite::Connection db_; |
57 Internals::SignalRemainingAncestor* signalRemainingAncestor_; | 57 Internals::SignalRemainingAncestor* signalRemainingAncestor_; |
58 unsigned int version_; | |
58 | 59 |
59 void Open(); | 60 void Open(); |
60 | 61 |
61 void GetChangesInternal(std::list<ServerIndexChange>& target, | 62 void GetChangesInternal(std::list<ServerIndexChange>& target, |
62 bool& done, | 63 bool& done, |
220 const std::string& value); | 221 const std::string& value); |
221 | 222 |
222 virtual void GetAllMetadata(std::map<MetadataType, std::string>& target, | 223 virtual void GetAllMetadata(std::map<MetadataType, std::string>& target, |
223 int64_t id); | 224 int64_t id); |
224 | 225 |
226 virtual unsigned int GetDatabaseVersion() | |
227 { | |
228 return version_; | |
229 } | |
230 | |
231 virtual void Upgrade(unsigned int targetVersion, | |
232 IStorageArea& storageArea); | |
225 | 233 |
226 | 234 |
227 | 235 |
228 /** | 236 /** |
229 * The methods declared below are for unit testing only! | 237 * The methods declared below are for unit testing only! |