comparison OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5497:4dd50c4b985a pg-transactions

merge default -> pg-transactions
author Alain Mazy <am@osimis.io>
date Tue, 23 Jan 2024 17:05:28 +0100
parents 26877f4b306f 4b3f5986eca1
children dd430a1b21fe
comparison
equal deleted inserted replaced
5494:3e02be2ccaee 5497:4dd50c4b985a
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-2023 Osimis S.A., Belgium 5 * Copyright (C) 2017-2024 Osimis S.A., Belgium
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium 6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
7 * 7 *
8 * This program is free software: you can redistribute it and/or 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 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 10 * published by the Free Software Foundation, either version 3 of the
11 * License, or (at your option) any later version. 11 * License, or (at your option) any later version.
3688 Operations operations; 3688 Operations operations;
3689 operations.Apply(*this, target); 3689 operations.Apply(*this, target);
3690 } 3690 }
3691 3691
3692 3692
3693 void StatelessDatabaseOperations::AddLabels(const std::string& publicId,
3694 ResourceType level,
3695 const std::set<std::string>& labels)
3696 {
3697 for (std::set<std::string>::const_iterator it = labels.begin(); it != labels.end(); ++it)
3698 {
3699 ModifyLabel(publicId, level, *it, LabelOperation_Add);
3700 }
3701 }
3702
3703
3693 void StatelessDatabaseOperations::ModifyLabel(const std::string& publicId, 3704 void StatelessDatabaseOperations::ModifyLabel(const std::string& publicId,
3694 ResourceType level, 3705 ResourceType level,
3695 const std::string& label, 3706 const std::string& label,
3696 LabelOperation operation) 3707 LabelOperation operation)
3697 { 3708 {