comparison OrthancServer/SQLiteDatabaseWrapper.h @ 3080:1a75595d8e44 db-changes

started refactoring of ServerIndex::Store()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 03 Jan 2019 18:21:22 +0100
parents ead8576a02ef
children 847a0ed92654
comparison
equal deleted inserted replaced
3079:65e2bfa953ef 3080:1a75595d8e44
34 #pragma once 34 #pragma once
35 35
36 #include "IDatabaseWrapper.h" 36 #include "IDatabaseWrapper.h"
37 37
38 #include "../Core/SQLite/Connection.h" 38 #include "../Core/SQLite/Connection.h"
39 #include "Search/Compatibility/ICompatibilityCreateInstance.h"
39 40
40 namespace Orthanc 41 namespace Orthanc
41 { 42 {
42 namespace Internals 43 namespace Internals
43 { 44 {
47 /** 48 /**
48 * This class manages an instance of the Orthanc SQLite database. It 49 * This class manages an instance of the Orthanc SQLite database. It
49 * translates low-level requests into SQL statements. Mutual 50 * translates low-level requests into SQL statements. Mutual
50 * exclusion MUST be implemented at a higher level. 51 * exclusion MUST be implemented at a higher level.
51 **/ 52 **/
52 class SQLiteDatabaseWrapper : public IDatabaseWrapper 53 class SQLiteDatabaseWrapper :
54 public IDatabaseWrapper,
55 public Compatibility::ICompatibilityCreateInstance
53 { 56 {
54 private: 57 private:
55 class Transaction; 58 class Transaction;
56 class LookupFormatter; 59 class LookupFormatter;
57 60
318 std::list<std::string>* instancesId, 321 std::list<std::string>* instancesId,
319 const std::vector<DatabaseConstraint>& lookup, 322 const std::vector<DatabaseConstraint>& lookup,
320 ResourceType queryLevel, 323 ResourceType queryLevel,
321 size_t limit) 324 size_t limit)
322 ORTHANC_OVERRIDE; 325 ORTHANC_OVERRIDE;
326
327 virtual bool CreateInstance(CreateInstanceResult& result,
328 int64_t& instanceId,
329 const std::string& patient,
330 const std::string& study,
331 const std::string& series,
332 const std::string& instance,
333 bool overwrite)
334 {
335 return ICompatibilityCreateInstance::Apply(
336 result, instanceId, *this, *this, patient, study, series, instance, overwrite);
337 }
323 }; 338 };
324 } 339 }