Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/BaseDatabaseWrapper.h @ 5466:dceed5e3d6a9 pg-transactions
new DB plugin primitive: UpdateAndGetStatistics
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 15 Dec 2023 17:15:43 +0100 |
parents | 176bc05f85f4 |
children | c5a274851b23 |
rev | line source |
---|---|
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
1 /** |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
7 * |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
9 * modify it under the terms of the GNU General Public License as |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
10 * published by the Free Software Foundation, either version 3 of the |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
11 * License, or (at your option) any later version. |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
12 * |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
16 * General Public License for more details. |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
17 * |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
20 **/ |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
21 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
22 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
23 #pragma once |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
24 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
25 #include "IDatabaseWrapper.h" |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
26 #include "../../../OrthancFramework/Sources/OrthancException.h" |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
27 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
28 namespace Orthanc |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
29 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
30 /** |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
31 * This class provides a default "not implemented" implementation |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
32 * for all recent methods (1.12.X) |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
33 **/ |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
34 class BaseDatabaseWrapper : public IDatabaseWrapper |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
35 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
36 public: |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
37 class BaseTransaction : public IDatabaseWrapper::ITransaction |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
38 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
39 virtual int64_t IncrementGlobalProperty(GlobalProperty property, |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
40 int64_t increment, |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
41 bool shared) ORTHANC_OVERRIDE |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
42 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
43 throw OrthancException(ErrorCode_NotImplemented); // Not supported |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
44 } |
5466
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
45 |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
46 virtual void UpdateAndGetStatistics(int64_t& patientsCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
47 int64_t& studiesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
48 int64_t& seriesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
49 int64_t& instancesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
50 int64_t& compressedSize, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
51 int64_t& uncompressedSize) ORTHANC_OVERRIDE |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
52 { |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
53 throw OrthancException(ErrorCode_NotImplemented); // Not supported |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
54 } |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
55 |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
56 }; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
57 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
58 }; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
59 } |