comparison OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 4514:5b929e6b3c36

removal of "dicom-as-json" attachments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 16 Feb 2021 12:18:41 +0100
parents d9473bd5ed43
children 2a0f8031fb93
comparison
equal deleted inserted replaced
4513:1f455b86b054 4514:5b929e6b3c36
801 s.BindInt(1, attachment); 801 s.BindInt(1, attachment);
802 s.Run(); 802 s.Run();
803 } 803 }
804 804
805 805
806 void SQLiteDatabaseWrapper::ListAvailableAttachments(std::list<FileContentType>& target, 806 void SQLiteDatabaseWrapper::ListAvailableAttachments(std::set<FileContentType>& target,
807 int64_t id) 807 int64_t id)
808 { 808 {
809 target.clear(); 809 target.clear();
810 810
811 SQLite::Statement s(db_, SQLITE_FROM_HERE, 811 SQLite::Statement s(db_, SQLITE_FROM_HERE,
812 "SELECT fileType FROM AttachedFiles WHERE id=?"); 812 "SELECT fileType FROM AttachedFiles WHERE id=?");
813 s.BindInt64(0, id); 813 s.BindInt64(0, id);
814 814
815 while (s.Step()) 815 while (s.Step())
816 { 816 {
817 target.push_back(static_cast<FileContentType>(s.ColumnInt(0))); 817 target.insert(static_cast<FileContentType>(s.ColumnInt(0)));
818 } 818 }
819 } 819 }
820 820
821 bool SQLiteDatabaseWrapper::LookupAttachment(FileInfo& attachment, 821 bool SQLiteDatabaseWrapper::LookupAttachment(FileInfo& attachment,
822 int64_t id, 822 int64_t id,