diff OrthancServer/DatabaseWrapper.cpp @ 438:7bbe77cb9e12

DELETE metadata
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 15 May 2013 16:51:10 +0200
parents d51186bf7602
children 23e5b35e3c5c
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp	Wed May 15 16:43:30 2013 +0200
+++ b/OrthancServer/DatabaseWrapper.cpp	Wed May 15 16:51:10 2013 +0200
@@ -340,6 +340,15 @@
     s.Run();
   }
 
+  void DatabaseWrapper::DeleteMetadata(int64_t id,
+                                       MetadataType type)
+  {
+    SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Metadata WHERE id=? and type=?");
+    s.BindInt(0, id);
+    s.BindInt(1, type);
+    s.Run();
+  }
+
   bool DatabaseWrapper::LookupMetadata(std::string& target,
                                        int64_t id,
                                        MetadataType type)