Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/IDatabaseWrapper.h @ 4627:f7d5372b59b3 db-changes
handling revisions of attachments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 20 Apr 2021 15:11:59 +0200 |
parents | 95ffe3b6ef7c |
children | 5fabef29c4ff |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/IDatabaseWrapper.h Mon Apr 19 10:28:43 2021 +0200 +++ b/OrthancServer/Sources/Database/IDatabaseWrapper.h Tue Apr 20 15:11:59 2021 +0200 @@ -78,8 +78,12 @@ // attachments (cf. "fastGetTotalSize_") virtual void Commit(int64_t fileSizeDelta) = 0; + // A call to "AddAttachment()" guarantees that this attachment + // is not already existing. This is different from + // "SetMetadata()" that might have to replace an older value. virtual void AddAttachment(int64_t id, - const FileInfo& attachment) = 0; + const FileInfo& attachment, + int64_t revision) = 0; virtual void ClearChanges() = 0; @@ -150,6 +154,7 @@ virtual void LogExportedResource(const ExportedResource& resource) = 0; virtual bool LookupAttachment(FileInfo& attachment, + int64_t& revision, int64_t id, FileContentType contentType) = 0;