annotate OrthancServer/Sources/Database/BaseDatabaseWrapper.h @ 5553:28cc06e4859a large-queries

Added ExtendedApiV1: /changes
author Alain Mazy <am@orthanc.team>
date Thu, 11 Apr 2024 19:02:20 +0200
parents bbe45a71f5cd
children 3765085693e5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
5498
c5a274851b23 update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5466
diff changeset
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium
c5a274851b23 update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5466
diff changeset
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
5455
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
176bc05f85f4 DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff changeset
27 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
28 {
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 * 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
31 * 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
32 **/
176bc05f85f4 DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff changeset
33 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
34 {
176bc05f85f4 DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff changeset
35 public:
176bc05f85f4 DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff changeset
36 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
37 {
5516
d9c9f3c57f4f reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5498
diff changeset
38 public:
5455
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,
5516
d9c9f3c57f4f reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5498
diff changeset
41 bool shared) ORTHANC_OVERRIDE;
5466
dceed5e3d6a9 new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 5455
diff changeset
42
dceed5e3d6a9 new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 5455
diff changeset
43 virtual void UpdateAndGetStatistics(int64_t& patientsCount,
dceed5e3d6a9 new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 5455
diff changeset
44 int64_t& studiesCount,
dceed5e3d6a9 new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 5455
diff changeset
45 int64_t& seriesCount,
dceed5e3d6a9 new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 5455
diff changeset
46 int64_t& instancesCount,
dceed5e3d6a9 new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents: 5455
diff changeset
47 int64_t& compressedSize,
5516
d9c9f3c57f4f reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5498
diff changeset
48 int64_t& uncompressedSize) ORTHANC_OVERRIDE;
5553
28cc06e4859a Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents: 5518
diff changeset
49
28cc06e4859a Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents: 5518
diff changeset
50 virtual void GetChanges2(std::list<ServerIndexChange>& target /*out*/,
28cc06e4859a Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents: 5518
diff changeset
51 bool& done /*out*/,
28cc06e4859a Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents: 5518
diff changeset
52 int64_t since,
28cc06e4859a Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents: 5518
diff changeset
53 int64_t to,
28cc06e4859a Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents: 5518
diff changeset
54 uint32_t limit,
28cc06e4859a Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents: 5518
diff changeset
55 ChangeType filterType) ORTHANC_OVERRIDE;
28cc06e4859a Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents: 5518
diff changeset
56
5455
176bc05f85f4 DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff changeset
57 };
5518
bbe45a71f5cd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5516
diff changeset
58
bbe45a71f5cd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5516
diff changeset
59 virtual uint64_t MeasureLatency() ORTHANC_OVERRIDE;
5455
176bc05f85f4 DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff changeset
60 };
5516
d9c9f3c57f4f reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5498
diff changeset
61 }