comparison 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
comparison
equal deleted inserted replaced
4626:686f189a903d 4627:f7d5372b59b3
76 // The "fileSizeDelta" is used for older database plugins that 76 // The "fileSizeDelta" is used for older database plugins that
77 // have no fast way to compute the size of all the stored 77 // have no fast way to compute the size of all the stored
78 // attachments (cf. "fastGetTotalSize_") 78 // attachments (cf. "fastGetTotalSize_")
79 virtual void Commit(int64_t fileSizeDelta) = 0; 79 virtual void Commit(int64_t fileSizeDelta) = 0;
80 80
81 // A call to "AddAttachment()" guarantees that this attachment
82 // is not already existing. This is different from
83 // "SetMetadata()" that might have to replace an older value.
81 virtual void AddAttachment(int64_t id, 84 virtual void AddAttachment(int64_t id,
82 const FileInfo& attachment) = 0; 85 const FileInfo& attachment,
86 int64_t revision) = 0;
83 87
84 virtual void ClearChanges() = 0; 88 virtual void ClearChanges() = 0;
85 89
86 virtual void ClearExportedResources() = 0; 90 virtual void ClearExportedResources() = 0;
87 91
148 const ServerIndexChange& change) = 0; 152 const ServerIndexChange& change) = 0;
149 153
150 virtual void LogExportedResource(const ExportedResource& resource) = 0; 154 virtual void LogExportedResource(const ExportedResource& resource) = 0;
151 155
152 virtual bool LookupAttachment(FileInfo& attachment, 156 virtual bool LookupAttachment(FileInfo& attachment,
157 int64_t& revision,
153 int64_t id, 158 int64_t id,
154 FileContentType contentType) = 0; 159 FileContentType contentType) = 0;
155 160
156 /** 161 /**
157 * If "shared" is "true", the property is shared by all the 162 * If "shared" is "true", the property is shared by all the