comparison OrthancServer/Sources/ServerIndex.h @ 4563:bb1c365f9e44 db-changes

end of refactoring read-only transactions
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Mar 2021 16:11:11 +0100
parents e19f11e08226
children 3495a3d97ab6
comparison
equal deleted inserted replaced
4562:e19f11e08226 4563:bb1c365f9e44
188 FileContentType type); 188 FileContentType type);
189 189
190 void SetGlobalProperty(GlobalProperty property, 190 void SetGlobalProperty(GlobalProperty property,
191 const std::string& value); 191 const std::string& value);
192 192
193 // Only applicable at the instance level
194 bool GetAllMainDicomTags(DicomMap& result,
195 const std::string& instancePublicId);
196
197 bool LookupResourceType(ResourceType& type,
198 const std::string& publicId);
199
200 unsigned int GetDatabaseVersion();
201
202 bool LookupParent(std::string& target,
203 const std::string& publicId,
204 ResourceType parentType);
205
206 void ReconstructInstance(const ParsedDicomFile& dicom); 193 void ReconstructInstance(const ParsedDicomFile& dicom);
207
208 void ApplyLookupResources(std::vector<std::string>& resourcesId,
209 std::vector<std::string>* instancesId, // Can be NULL if not needed
210 const DatabaseLookup& lookup,
211 ResourceType queryLevel,
212 size_t limit);
213 194
214 195
215 196
216 /*** 197 /***
217 ** PROTOTYPING FOR DB REFACTORING BELOW 198 ** PROTOTYPING FOR DB REFACTORING BELOW
297 int64_t id) 278 int64_t id)
298 { 279 {
299 db_.GetChildrenPublicId(target, id); 280 db_.GetChildrenPublicId(target, id);
300 } 281 }
301 282
283 unsigned int GetDatabaseVersion()
284 {
285 return db_.GetDatabaseVersion();
286 }
287
302 void GetExportedResources(std::list<ExportedResource>& target /*out*/, 288 void GetExportedResources(std::list<ExportedResource>& target /*out*/,
303 bool& done /*out*/, 289 bool& done /*out*/,
304 int64_t since, 290 int64_t since,
305 uint32_t maxResults) 291 uint32_t maxResults)
306 { 292 {
532 518
533 bool GetMainDicomTags(DicomMap& result, 519 bool GetMainDicomTags(DicomMap& result,
534 const std::string& publicId, 520 const std::string& publicId,
535 ResourceType expectedType, 521 ResourceType expectedType,
536 ResourceType levelOfInterest); 522 ResourceType levelOfInterest);
523
524 // Only applicable at the instance level
525 bool GetAllMainDicomTags(DicomMap& result,
526 const std::string& instancePublicId);
527
528 bool LookupResourceType(ResourceType& type,
529 const std::string& publicId);
530
531 unsigned int GetDatabaseVersion();
532
533 bool LookupParent(std::string& target,
534 const std::string& publicId,
535 ResourceType parentType);
536
537 void ApplyLookupResources(std::vector<std::string>& resourcesId,
538 std::vector<std::string>* instancesId, // Can be NULL if not needed
539 const DatabaseLookup& lookup,
540 ResourceType queryLevel,
541 size_t limit);
537 }; 542 };
538 } 543 }