Mercurial > hg > orthanc
comparison OrthancServer/DatabaseWrapper.cpp @ 440:23e5b35e3c5c
statistics for patient/studies/series/instances
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 15 May 2013 17:44:15 +0200 |
parents | 7bbe77cb9e12 |
children | 935e8c7e0b18 |
comparison
equal
deleted
inserted
replaced
439:081a44d5110b | 440:23e5b35e3c5c |
---|---|
436 s.BindInt(4, attachment.GetUncompressedSize()); | 436 s.BindInt(4, attachment.GetUncompressedSize()); |
437 s.BindInt(5, attachment.GetCompressionType()); | 437 s.BindInt(5, attachment.GetCompressionType()); |
438 s.Run(); | 438 s.Run(); |
439 } | 439 } |
440 | 440 |
441 void DatabaseWrapper::ListAvailableAttachments(std::list<FileContentType>& result, | |
442 int64_t id) | |
443 { | |
444 result.clear(); | |
445 | |
446 SQLite::Statement s(db_, SQLITE_FROM_HERE, | |
447 "SELECT fileType FROM AttachedFiles WHERE id=?"); | |
448 s.BindInt(0, id); | |
449 | |
450 while (s.Step()) | |
451 { | |
452 result.push_back(static_cast<FileContentType>(s.ColumnInt(0))); | |
453 } | |
454 } | |
455 | |
441 bool DatabaseWrapper::LookupAttachment(FileInfo& attachment, | 456 bool DatabaseWrapper::LookupAttachment(FileInfo& attachment, |
442 int64_t id, | 457 int64_t id, |
443 FileContentType contentType) | 458 FileContentType contentType) |
444 { | 459 { |
445 SQLite::Statement s(db_, SQLITE_FROM_HERE, | 460 SQLite::Statement s(db_, SQLITE_FROM_HERE, |