Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 5249:f22c8fac764b db-protobuf
added "/tools/labels" to list all the labels that are associated with any resource
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Apr 2023 22:54:57 +0200 |
parents | a7d95f951f8a |
children | 261ce0ed85e6 |
comparison
equal
deleted
inserted
replaced
5248:a7d95f951f8a | 5249:f22c8fac764b |
---|---|
1121 while (s.Step()) | 1121 while (s.Step()) |
1122 { | 1122 { |
1123 target.insert(s.ColumnString(0)); | 1123 target.insert(s.ColumnString(0)); |
1124 } | 1124 } |
1125 } | 1125 } |
1126 | |
1127 | |
1128 virtual void ListAllLabels(std::set<std::string>& target) ORTHANC_OVERRIDE | |
1129 { | |
1130 target.clear(); | |
1131 | |
1132 SQLite::Statement s(db_, SQLITE_FROM_HERE, | |
1133 "SELECT DISTINCT label FROM Labels"); | |
1134 | |
1135 while (s.Step()) | |
1136 { | |
1137 target.insert(s.ColumnString(0)); | |
1138 } | |
1139 } | |
1126 }; | 1140 }; |
1127 | 1141 |
1128 | 1142 |
1129 class SQLiteDatabaseWrapper::SignalFileDeleted : public SQLite::IScalarFunction | 1143 class SQLiteDatabaseWrapper::SignalFileDeleted : public SQLite::IScalarFunction |
1130 { | 1144 { |