Mercurial > hg > orthanc-databases
comparison Resources/Orthanc/Databases/ISqlLookupFormatter.h @ 405:1938ba8fba35
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 15 Apr 2023 13:49:53 +0200 |
parents | 1280b40d6696 |
children | de6de66d70b2 |
comparison
equal
deleted
inserted
replaced
394:2fd272ea8f00 | 405:1938ba8fba35 |
---|---|
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-2022 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | 6 * Copyright (C) 2021-2023 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. |
33 | 33 |
34 namespace Orthanc | 34 namespace Orthanc |
35 { | 35 { |
36 class DatabaseConstraint; | 36 class DatabaseConstraint; |
37 | 37 |
38 enum LabelsConstraint | |
39 { | |
40 LabelsConstraint_All, | |
41 LabelsConstraint_Any, | |
42 LabelsConstraint_None | |
43 }; | |
44 | |
38 // This class is also used by the "orthanc-databases" project | 45 // This class is also used by the "orthanc-databases" project |
39 class ISqlLookupFormatter : public boost::noncopyable | 46 class ISqlLookupFormatter : public boost::noncopyable |
40 { | 47 { |
41 public: | 48 public: |
42 virtual ~ISqlLookupFormatter() | 49 virtual ~ISqlLookupFormatter() |
49 | 56 |
50 virtual std::string FormatWildcardEscape() = 0; | 57 virtual std::string FormatWildcardEscape() = 0; |
51 | 58 |
52 /** | 59 /** |
53 * Whether to escape '[' and ']', which is only needed for | 60 * Whether to escape '[' and ']', which is only needed for |
54 * MSSQL. New in Orthanc 1.9.8, from the following changeset: | 61 * MSSQL. New in Orthanc 1.10.0, from the following changeset: |
55 * https://hg.orthanc-server.com/orthanc-databases/rev/389c037387ea | 62 * https://hg.orthanc-server.com/orthanc-databases/rev/389c037387ea |
56 **/ | 63 **/ |
57 virtual bool IsEscapeBrackets() const = 0; | 64 virtual bool IsEscapeBrackets() const = 0; |
58 | 65 |
59 static void Apply(std::string& sql, | 66 static void Apply(std::string& sql, |
60 ISqlLookupFormatter& formatter, | 67 ISqlLookupFormatter& formatter, |
61 const std::vector<DatabaseConstraint>& lookup, | 68 const std::vector<DatabaseConstraint>& lookup, |
62 ResourceType queryLevel, | 69 ResourceType queryLevel, |
70 const std::set<std::string>& labels, // New in Orthanc 1.12.0 | |
71 LabelsConstraint labelsConstraint, // New in Orthanc 1.12.0 | |
63 size_t limit); | 72 size_t limit); |
64 }; | 73 }; |
65 } | 74 } |