diff 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
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp	Wed Feb 05 17:20:43 2014 +0100
+++ b/OrthancServer/DatabaseWrapper.cpp	Wed Feb 05 17:49:30 2014 +0100
@@ -459,6 +459,18 @@
     s.Run();
   }
 
+
+  void DatabaseWrapper::DeleteAttachment(int64_t id,
+                                         FileContentType attachment)
+  {
+    SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Resources WHERE internalId=?");
+    s.BindInt64(0, id);
+    s.BindInt(1, attachment);
+    s.Run();
+  }
+
+
+
   void DatabaseWrapper::ListAvailableAttachments(std::list<FileContentType>& result,
                                                  int64_t id)
   {