comparison OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 5220:df39c7583a49 db-protobuf

preparing virtual methods for labels
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Apr 2023 18:09:04 +0200
parents 450ac804d3af
children d0f7c742d397
comparison
equal deleted inserted replaced
5218:afa96af2eb5a 5220:df39c7583a49
339 339
340 virtual void ApplyLookupResources(std::list<std::string>& resourcesId, 340 virtual void ApplyLookupResources(std::list<std::string>& resourcesId,
341 std::list<std::string>* instancesId, 341 std::list<std::string>* instancesId,
342 const std::vector<DatabaseConstraint>& lookup, 342 const std::vector<DatabaseConstraint>& lookup,
343 ResourceType queryLevel, 343 ResourceType queryLevel,
344 const std::set<std::string>& withLabels,
345 const std::set<std::string>& withoutLabels,
344 uint32_t limit) ORTHANC_OVERRIDE 346 uint32_t limit) ORTHANC_OVERRIDE
345 { 347 {
348 if (!withLabels.empty() ||
349 !withoutLabels.empty())
350 {
351 throw OrthancException(ErrorCode_NotImplemented);
352 }
353
346 LookupFormatter formatter; 354 LookupFormatter formatter;
347 355
348 std::string sql; 356 std::string sql;
349 LookupFormatter::Apply(sql, formatter, lookup, queryLevel, limit); 357 LookupFormatter::Apply(sql, formatter, lookup, queryLevel, limit);
350 358
1068 SQLite::Statement s(db_, SQLITE_FROM_HERE, 1076 SQLite::Statement s(db_, SQLITE_FROM_HERE,
1069 "INSERT INTO PatientRecyclingOrder (seq, patientId) VALUES(NULL, ?)"); 1077 "INSERT INTO PatientRecyclingOrder (seq, patientId) VALUES(NULL, ?)");
1070 s.BindInt64(0, patient); 1078 s.BindInt64(0, patient);
1071 s.Run(); 1079 s.Run();
1072 } 1080 }
1081 }
1082
1083
1084 virtual void AddLabel(int64_t resource,
1085 const std::string& label) ORTHANC_OVERRIDE
1086 {
1087 throw OrthancException(ErrorCode_NotImplemented);
1088 }
1089
1090
1091 virtual void RemoveLabel(int64_t resource,
1092 const std::string& label) ORTHANC_OVERRIDE
1093 {
1094 throw OrthancException(ErrorCode_NotImplemented);
1095 }
1096
1097
1098 virtual void GetLabels(std::set<std::string>& target,
1099 int64_t resource) ORTHANC_OVERRIDE
1100 {
1101 throw OrthancException(ErrorCode_NotImplemented);
1073 } 1102 }
1074 }; 1103 };
1075 1104
1076 1105
1077 class SQLiteDatabaseWrapper::SignalFileDeleted : public SQLite::IScalarFunction 1106 class SQLiteDatabaseWrapper::SignalFileDeleted : public SQLite::IScalarFunction