Mercurial > hg > orthanc-databases
comparison PostgreSQL/Plugins/PostgreSQLIndex.h @ 569:f18e46d7dbf8 attach-custom-data
merged find-refactoring -> attach-custom-data
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 24 Sep 2024 15:04:21 +0200 |
parents | cd9521e04249 d8ee2f676a3c |
children |
comparison
equal
deleted
inserted
replaced
368:82f73188b58d | 569:f18e46d7dbf8 |
---|---|
1 /** | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4 * Department, University Hospital of Liege, Belgium | 4 * Department, University Hospital of Liege, Belgium |
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium | |
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
6 * | 8 * |
7 * This program is free software: you can redistribute it and/or | 9 * This program is free software: you can redistribute it and/or |
8 * modify it under the terms of the GNU Affero General Public License | 10 * modify it under the terms of the GNU Affero General Public License |
9 * as published by the Free Software Foundation, either version 3 of | 11 * as published by the Free Software Foundation, either version 3 of |
10 * the License, or (at your option) any later version. | 12 * the License, or (at your option) any later version. |
30 { | 32 { |
31 private: | 33 private: |
32 PostgreSQLParameters parameters_; | 34 PostgreSQLParameters parameters_; |
33 bool clearAll_; | 35 bool clearAll_; |
34 | 36 |
37 protected: | |
38 virtual void ClearDeletedFiles(DatabaseManager& manager) ORTHANC_OVERRIDE; | |
39 | |
40 virtual void ClearDeletedResources(DatabaseManager& manager) ORTHANC_OVERRIDE; | |
41 | |
42 virtual void ClearRemainingAncestor(DatabaseManager& manager) ORTHANC_OVERRIDE; | |
43 | |
44 void ApplyPrepareIndex(DatabaseManager::Transaction& t, DatabaseManager& manager); | |
45 | |
35 public: | 46 public: |
36 PostgreSQLIndex(OrthancPluginContext* context, | 47 PostgreSQLIndex(OrthancPluginContext* context, |
37 const PostgreSQLParameters& parameters); | 48 const PostgreSQLParameters& parameters); |
38 | 49 |
39 void SetClearAll(bool clear) | 50 void SetClearAll(bool clear) |
41 clearAll_ = clear; | 52 clearAll_ = clear; |
42 } | 53 } |
43 | 54 |
44 virtual IDatabaseFactory* CreateDatabaseFactory() ORTHANC_OVERRIDE; | 55 virtual IDatabaseFactory* CreateDatabaseFactory() ORTHANC_OVERRIDE; |
45 | 56 |
46 virtual void ConfigureDatabase(DatabaseManager& manager) ORTHANC_OVERRIDE; | 57 virtual void ConfigureDatabase(DatabaseManager& manager, |
58 bool hasIdentifierTags, | |
59 const std::list<IdentifierTag>& identifierTags) ORTHANC_OVERRIDE; | |
47 | 60 |
48 virtual bool HasRevisionsSupport() const ORTHANC_OVERRIDE | 61 virtual bool HasRevisionsSupport() const ORTHANC_OVERRIDE |
49 { | 62 { |
50 return true; | 63 return true; |
51 } | 64 } |
55 return true; | 68 return true; |
56 } | 69 } |
57 | 70 |
58 virtual int64_t CreateResource(DatabaseManager& manager, | 71 virtual int64_t CreateResource(DatabaseManager& manager, |
59 const char* publicId, | 72 const char* publicId, |
60 OrthancPluginResourceType type) | 73 OrthancPluginResourceType type) ORTHANC_OVERRIDE; |
61 ORTHANC_OVERRIDE; | 74 |
75 virtual void DeleteResource(IDatabaseBackendOutput& output, | |
76 DatabaseManager& manager, | |
77 int64_t id) ORTHANC_OVERRIDE; | |
78 | |
79 virtual void SetResourcesContent(DatabaseManager& manager, | |
80 uint32_t countIdentifierTags, | |
81 const OrthancPluginResourcesContentTags* identifierTags, | |
82 uint32_t countMainDicomTags, | |
83 const OrthancPluginResourcesContentTags* mainDicomTags, | |
84 uint32_t countMetadata, | |
85 const OrthancPluginResourcesContentMetadata* metadata) ORTHANC_OVERRIDE; | |
62 | 86 |
63 virtual uint64_t GetTotalCompressedSize(DatabaseManager& manager) ORTHANC_OVERRIDE; | 87 virtual uint64_t GetTotalCompressedSize(DatabaseManager& manager) ORTHANC_OVERRIDE; |
64 | 88 |
65 virtual uint64_t GetTotalUncompressedSize(DatabaseManager& manager) ORTHANC_OVERRIDE; | 89 virtual uint64_t GetTotalUncompressedSize(DatabaseManager& manager) ORTHANC_OVERRIDE; |
66 | 90 |
84 | 108 |
85 virtual int64_t GetLastChangeIndex(DatabaseManager& manager) ORTHANC_OVERRIDE; | 109 virtual int64_t GetLastChangeIndex(DatabaseManager& manager) ORTHANC_OVERRIDE; |
86 | 110 |
87 virtual void TagMostRecentPatient(DatabaseManager& manager, | 111 virtual void TagMostRecentPatient(DatabaseManager& manager, |
88 int64_t patient) ORTHANC_OVERRIDE; | 112 int64_t patient) ORTHANC_OVERRIDE; |
113 | |
114 // New primitive since Orthanc 1.12.0 | |
115 virtual bool HasLabelsSupport() const ORTHANC_OVERRIDE | |
116 { | |
117 return true; | |
118 } | |
119 | |
120 virtual bool HasAtomicIncrementGlobalProperty() ORTHANC_OVERRIDE | |
121 { | |
122 return true; | |
123 } | |
124 | |
125 virtual int64_t IncrementGlobalProperty(DatabaseManager& manager, | |
126 const char* serverIdentifier, | |
127 int32_t property, | |
128 int64_t increment) ORTHANC_OVERRIDE; | |
129 | |
130 virtual bool HasUpdateAndGetStatistics() ORTHANC_OVERRIDE | |
131 { | |
132 return true; | |
133 } | |
134 | |
135 virtual void UpdateAndGetStatistics(DatabaseManager& manager, | |
136 int64_t& patientsCount, | |
137 int64_t& studiesCount, | |
138 int64_t& seriesCount, | |
139 int64_t& instancesCount, | |
140 int64_t& compressedSize, | |
141 int64_t& uncompressedSize) ORTHANC_OVERRIDE; | |
142 | |
143 // #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 5) | |
144 // virtual bool HasFindSupport() const ORTHANC_OVERRIDE; | |
145 // #endif | |
146 | |
147 // #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 5) | |
148 // virtual void ExecuteFind(Orthanc::DatabasePluginMessages::TransactionResponse& response, | |
149 // DatabaseManager& manager, | |
150 // const Orthanc::DatabasePluginMessages::Find_Request& request) ORTHANC_OVERRIDE; | |
151 // #endif | |
89 }; | 152 }; |
90 } | 153 } |