Mercurial > hg > orthanc
comparison OrthancServer/DatabaseWrapper.cpp @ 699:2929e17f8447
add attachments to resources
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Feb 2014 17:49:30 +0100 |
parents | 72dc919a028c |
children | f9052558eada |
comparison
equal
deleted
inserted
replaced
698:aae83e1e31f7 | 699:2929e17f8447 |
---|---|
457 s.BindString(6, attachment.GetUncompressedMD5()); | 457 s.BindString(6, attachment.GetUncompressedMD5()); |
458 s.BindString(7, attachment.GetCompressedMD5()); | 458 s.BindString(7, attachment.GetCompressedMD5()); |
459 s.Run(); | 459 s.Run(); |
460 } | 460 } |
461 | 461 |
462 | |
463 void DatabaseWrapper::DeleteAttachment(int64_t id, | |
464 FileContentType attachment) | |
465 { | |
466 SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Resources WHERE internalId=?"); | |
467 s.BindInt64(0, id); | |
468 s.BindInt(1, attachment); | |
469 s.Run(); | |
470 } | |
471 | |
472 | |
473 | |
462 void DatabaseWrapper::ListAvailableAttachments(std::list<FileContentType>& result, | 474 void DatabaseWrapper::ListAvailableAttachments(std::list<FileContentType>& result, |
463 int64_t id) | 475 int64_t id) |
464 { | 476 { |
465 result.clear(); | 477 result.clear(); |
466 | 478 |