comparison OrthancServer/LookupIdentifierQuery.h @ 1746:d143db00a794 db-changes

SetOfResources
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 26 Oct 2015 16:04:58 +0100
parents 38dda23c7d7d
children
comparison
equal deleted inserted replaced
1745:38dda23c7d7d 1746:d143db00a794
52 * 52 *
53 * Pay attention to the fact that "*" (resp. "?") generally 53 * Pay attention to the fact that "*" (resp. "?") generally
54 * corresponds to "%" (resp. "_") in primitive LIKE of SQL. The 54 * corresponds to "%" (resp. "_") in primitive LIKE of SQL. The
55 * values "%", "_", "\" should in the user request should 55 * values "%", "_", "\" should in the user request should
56 * respectively be escaped as "\%", "\_" and "\\". 56 * respectively be escaped as "\%", "\_" and "\\".
57 * 57 *
58 * This matching must be case sensitive: The special case of PN VR 58 * This matching must be case sensitive: The special case of PN VR
59 * is taken into consideration by normalizing the query string in 59 * is taken into consideration by normalizing the query string in
60 * method "NormalizeIdentifier()". 60 * method "NormalizeIdentifier()".
61 **/ 61 **/
62
63
64 62
65 class LookupIdentifierQuery : public boost::noncopyable 63 class LookupIdentifierQuery : public boost::noncopyable
66 { 64 {
67 private: 65 private:
68 struct Constraint 66 struct Constraint
101 99
102 void AddConstraint(DicomTag tag, 100 void AddConstraint(DicomTag tag,
103 IdentifierConstraintType type, 101 IdentifierConstraintType type,
104 const std::string& value); 102 const std::string& value);
105 103
106 size_t GetSize() 104 ResourceType GetLevel() const
105 {
106 return level_;
107 }
108
109 size_t GetSize() const
107 { 110 {
108 return constraints_.size(); 111 return constraints_.size();
109 } 112 }
110 113
111 const DicomTag& GetTag(size_t index) const; 114 const DicomTag& GetTag(size_t index) const;
116 119
117 static void StoreIdentifiers(IDatabaseWrapper& database, 120 static void StoreIdentifiers(IDatabaseWrapper& database,
118 int64_t resource, 121 int64_t resource,
119 ResourceType level, 122 ResourceType level,
120 const DicomMap& map); 123 const DicomMap& map);
121 124
125 // The database must be locked
126 void Apply(std::list<std::string>& result,
127 IDatabaseWrapper& database);
122 }; 128 };
123 } 129 }