diff OrthancServer/DatabaseWrapper.cpp @ 513:935e8c7e0b18

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Aug 2013 17:11:45 +0200
parents 23e5b35e3c5c
children 2c739f76d0bb
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.cpp	Fri Aug 16 15:39:53 2013 +0200
+++ b/OrthancServer/DatabaseWrapper.cpp	Fri Aug 16 17:11:45 2013 +0200
@@ -949,4 +949,13 @@
   {
     db_.Execute("DELETE FROM " + tableName);    
   }
+
+
+  bool DatabaseWrapper::IsExistingResource(int64_t internalId)
+  {
+    SQLite::Statement s(db_, SQLITE_FROM_HERE, 
+                        "SELECT * FROM Resources WHERE internalId=?");
+    s.BindInt(0, internalId);
+    return s.Step();
+  }
 }