comparison OrthancServer/Sources/Database/BaseDatabaseWrapper.h @ 5455:176bc05f85f4 pg-transactions

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